{"record":{"id":"2f47c2eadf5fbaba","repo":"oracle/graal","slug":"expected-resolved-annotation-member-type-got","errorCode":null,"errorMessage":"Expected resolved annotation member type, got {}","messagePattern":"Expected resolved annotation member type, got (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java","lineNumber":739,"sourceCode":"     * guest exception proxy.\n     */\n    private JavaConstant guestEnumValue(EnumElement enumElement, JavaType expectedType) {\n        ResolvedJavaType enumType = enumElement.enumType;\n        if (!(expectedType instanceof ResolvedJavaType expectedEnumType) || !expectedEnumType.equals(enumType)) {\n            throw new IllegalArgumentException(\"Unexpected enum type: \" + enumType.toJavaName());\n        }\n        JavaConstant enumClass = access.getProviders().getConstantReflection().asJavaClass(enumType);\n        JavaConstant enumName = access.getProviders().getConstantReflection().forString(enumElement.name);\n        return access.invoke(access.com_oracle_truffle_espresso_vmaccess_guest_GuestAnnotationProxyBuilder_enumValue, null, enumClass, enumName);\n    }\n\n    /**\n     * Converts a nested annotation value after verifying its concrete type against the enclosing\n     * member declaration.\n     */\n    private JavaConstant guestAnnotationValue(AnnotationValue annotationValue, JavaType expectedType) {\n        if (!(expectedType instanceof ResolvedJavaType expectedAnnotationType)) {\n            throw new IllegalArgumentException(\"Expected resolved annotation member type, got \" + expectedType);\n        }\n        validateAnnotationType(expectedAnnotationType, annotationValue.getAnnotationType(), \"annotation member type\");\n        return createGuestAnnotation(annotationValue);\n    }\n\n    /**\n     * Constructs a typed guest annotation array, promoting any deferred element failure to the\n     * member-level exception proxy required by the JDK annotation handler.\n     */\n    private JavaConstant guestArrayValue(List<?> values, JavaType expectedType, JavaConstant annotationClass, JavaConstant memberName) {\n        if (!(expectedType instanceof ResolvedJavaType arrayType) || !arrayType.isArray()) {\n            throw new IllegalArgumentException(\"Expected array annotation member type, got \" + expectedType);\n        }\n        ResolvedJavaType componentType = arrayType.getComponentType();\n        for (Object value : values) {\n            if (value instanceof ErrorElement) {\n                return toGuestAnnotationMemberValue(value, componentType, true, annotationClass, memberName);\n            }","sourceCodeStart":721,"sourceCodeEnd":757,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java#L721-L757","documentation":"Error \"Expected resolved annotation member type, got {}\" thrown in oracle/graal.","triggerScenarios":"Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java:739 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Expected resolved annotation member type, got {}","solutions":["Fix the condition reported by the error: Expected resolved annotation member type, got {}","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Expected resolved annotation member type, got {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}