Skip to content

Commit 88eb3db

Browse files
committed
Fix ClassCastException in AnonymousMethodNode::getStatementBlock
1 parent 28f967a commit 88eb3db

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/AnonymousMethodNodeImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public boolean isProcedure() {
101101

102102
@Override
103103
public CompoundStatementNode getStatementBlock() {
104-
return (CompoundStatementNode) getChild(1);
104+
return getFirstChildOfType(CompoundStatementNode.class);
105105
}
106106

107107
@Override

0 commit comments

Comments
 (0)