diff --git a/src/main/java/net/prominic/groovyls/compiler/util/GroovyASTUtils.java b/src/main/java/net/prominic/groovyls/compiler/util/GroovyASTUtils.java index 58d0403..6b4f46d 100644 --- a/src/main/java/net/prominic/groovyls/compiler/util/GroovyASTUtils.java +++ b/src/main/java/net/prominic/groovyls/compiler/util/GroovyASTUtils.java @@ -234,6 +234,10 @@ public static ClassNode getTypeOfNode(ASTNode node, ASTNodeVisitor astVisitor) { if (propNode != null) { return getTypeOfNode(propNode, astVisitor); } + FieldNode fieldNode = GroovyASTUtils.getFieldFromExpression(expression, astVisitor); + if (fieldNode != null) { + return getTypeOfNode(fieldNode, astVisitor); + } return expression.getType(); } else if (node instanceof Variable) { Variable var = (Variable) node;