oracle/graal · error · ElementException
NodeInputList field must be annotated with @${Input.getSimpl
Error message
NodeInputList field must be annotated with @${Input.getSimpleName()} or @${OptionalInput.getSimpleName()} What it means
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).
Source
Thrown at compiler/src/jdk.graal.compiler.processor/src/jdk/graal/compiler/nodeinfo/processor/GraphNodeVerifier.java:169
}
} else {
if (!isAssignableWithErasure(field, Node)) {
throw new ElementException(field, "Successor field must be a Node type");
}
if (modifiers.contains(FINAL)) {
throw new ElementException(field, "Successor field must not be final");
}
if (modifiers.contains(PUBLIC)) {
throw new ElementException(field, "Successor field must not be public");
}
}
} else {
if (isAssignableWithErasure(field, Node) && !field.getSimpleName().contentEquals("Null")) {
throw new ElementException(field, "Node field must be annotated with @" + Input.getSimpleName() + ", @" + OptionalInput.getSimpleName() + " or @" + Successor.getSimpleName());
}
if (isAssignableWithErasure(field, NodeInputList)) {
throw new ElementException(field, "NodeInputList field must be annotated with @" + Input.getSimpleName() + " or @" + OptionalInput.getSimpleName());
}
if (isAssignableWithErasure(field, NodeSuccessorList)) {
throw new ElementException(field, "NodeSuccessorList field must be annotated with @" + Successor.getSimpleName());
}
if (modifiers.contains(PUBLIC) && !modifiers.contains(FINAL)) {
throw new ElementException(field, "Data field must be final if public");
}
}
}
currentClazz = getSuperType(currentClazz);
} while (!isObject(getSuperType(currentClazz).asType()));
}
private AnnotationMirror findAnnotationMirror(List<? extends AnnotationMirror> mirrors, TypeElement expectedAnnotationType) {
for (AnnotationMirror mirror : mirrors) {
if (sameType(mirror.getAnnotationType(), expectedAnnotationType.asType())) {
return mirror;
}View on GitHub (pinned to a66e9ccd1d)
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.
Example fix
// before protected NodeInputList<ValueNode> arguments; // after @Input protected NodeInputList<ValueNode> arguments;
Defensive patterns
Strategy: validation
Prevention
- NodeInputList fields always need @Input or @OptionalInput.
- For lists that are not graph edges, use plain java.util.List or make the field transient.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Node field must be annotated with @${Input.getSimpleName()},
- NodeSuccessorList field must be annotated with @${Successor.
- Input list field must not be final
- Input list field must not be public
- Input field type must be an interface or assignable to Node
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/04d52ee282b6c7f6.
Report an issue: GitHub.