Skip to content

Commit 64f762f

Browse files
cirrasfourls
authored andcommitted
Use NameOccurrence::isAttributeReference instead of instanceof check
1 parent 8415cc1 commit 64f762f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/node/AttributeNodeImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public NameOccurrence getTypeNameOccurrence() {
7373
NameReferenceNode nameReference = getNameReference();
7474
if (nameReference != null) {
7575
NameOccurrence occurrence = nameReference.getLastName().getNameOccurrence();
76-
if (occurrence instanceof AttributeNameOccurrenceImpl) {
76+
if (occurrence != null && occurrence.isAttributeReference()) {
7777
return occurrence;
7878
}
7979
}

0 commit comments

Comments
 (0)