{"record":{"id":"04d52ee282b6c7f6","repo":"oracle/graal","slug":"nodeinputlist-field-must-be-annotated-with-inpu","errorCode":null,"errorMessage":"NodeInputList field must be annotated with @${Input.getSimpleName()} or @${OptionalInput.getSimpleName()}","messagePattern":"NodeInputList field must be annotated with @(.+?) or @(.+?)","errorType":"validation","errorClass":"ElementException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.processor/src/jdk/graal/compiler/nodeinfo/processor/GraphNodeVerifier.java","lineNumber":169,"sourceCode":"                        }\n                    } else {\n                        if (!isAssignableWithErasure(field, Node)) {\n                            throw new ElementException(field, \"Successor field must be a Node type\");\n                        }\n                        if (modifiers.contains(FINAL)) {\n                            throw new ElementException(field, \"Successor field must not be final\");\n                        }\n                        if (modifiers.contains(PUBLIC)) {\n                            throw new ElementException(field, \"Successor field must not be public\");\n                        }\n                    }\n\n                } else {\n                    if (isAssignableWithErasure(field, Node) && !field.getSimpleName().contentEquals(\"Null\")) {\n                        throw new ElementException(field, \"Node field must be annotated with @\" + Input.getSimpleName() + \", @\" + OptionalInput.getSimpleName() + \" or @\" + Successor.getSimpleName());\n                    }\n                    if (isAssignableWithErasure(field, NodeInputList)) {\n                        throw new ElementException(field, \"NodeInputList field must be annotated with @\" + Input.getSimpleName() + \" or @\" + OptionalInput.getSimpleName());\n                    }\n                    if (isAssignableWithErasure(field, NodeSuccessorList)) {\n                        throw new ElementException(field, \"NodeSuccessorList field must be annotated with @\" + Successor.getSimpleName());\n                    }\n                    if (modifiers.contains(PUBLIC) && !modifiers.contains(FINAL)) {\n                        throw new ElementException(field, \"Data field must be final if public\");\n                    }\n                }\n            }\n            currentClazz = getSuperType(currentClazz);\n        } while (!isObject(getSuperType(currentClazz).asType()));\n    }\n\n    private AnnotationMirror findAnnotationMirror(List<? extends AnnotationMirror> mirrors, TypeElement expectedAnnotationType) {\n        for (AnnotationMirror mirror : mirrors) {\n            if (sameType(mirror.getAnnotationType(), expectedAnnotationType.asType())) {\n                return mirror;\n            }","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.processor/src/jdk/graal/compiler/nodeinfo/processor/GraphNodeVerifier.java#L151-L187","documentation":"NodeInputList fields must carry @Input or @OptionalInput. An unannotated input list would be a collection of Node references the graph does not know about: no usage tracking, no visiting, no replacement handling, which breaks graph integrity. GraphNodeVerifier throws this during annotation processing whenever it finds a NodeInputList-typed field without an input annotation (there is no 'Null' exemption here).","triggerScenarios":"isAssignableWithErasure(field, NodeInputList) is true and neither @Input nor @OptionalInput (nor @Successor) is present on the field (GraphNodeVerifier.java:168-170). Example: 'protected NodeInputList<ValueNode> args;' with no annotation.","commonSituations":"Adding an argument list to a node and forgetting the annotation; copy-pasting a list field from a non-node class; renaming annotations during import fixes so the annotation resolves to the wrong type.","solutions":["Add @Input (or @OptionalInput if entries may be absent/null) to the NodeInputList field.","If the list is not part of the graph, use a plain List type instead of NodeInputList, or mark the field transient/static so the verifier skips it.","Rebuild to confirm."],"exampleFix":"// before\nprotected NodeInputList<ValueNode> arguments;\n\n// after\n@Input\nprotected NodeInputList<ValueNode> arguments;","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["NodeInputList fields always need @Input or @OptionalInput.","For lists that are not graph edges, use plain java.util.List or make the field transient."],"tags":["java","graalvm","annotation-processing","graal-node","graph-invariants","compile-time"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}