Skip to content

Commit 659a09c

Browse files
committed
GR-36195: createAnnotationType check for null type
1 parent 009c352 commit 659a09c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/PythonSSTNodeFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public SSTNode createImportFrom(String from, String[][] asNames, int startOffset
183183

184184
public SSTNode createAnnotationType(SSTNode type) {
185185
SSTNode annotType = type;
186-
if (futureAnnotations) {
186+
if (futureAnnotations && type != null) {
187187
final String value = source.getCharacters().subSequence(type.getStartOffset() - 1, type.getEndOffset() + 1).toString();
188188
annotType = createStringLiteral(new String[]{value}, type.getStartOffset(), type.getEndOffset());
189189
}

0 commit comments

Comments
 (0)