Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1-beta-1
-
None
-
None
-
Windows XP, Java 1.6.0_02, recent groovy from svn
Description
In "Helper.java," put:
public class Helper {
public static final int num = 44;
}
run "javac Helper.java"
In "bug.groovy," put:
import Helper
new int[Helper.num]
run "groovy bug.groovy." I get: Caught: java.lang.StackOverflowError. The call stack is:
ResolveVisitor.resolveAliasFromModule(ClassNode) line: 415
ResolveVisitor.resolveFromModule(ClassNode, boolean) line: 512
ResolveVisitor.resolve(ClassNode, boolean, boolean, boolean) line: 225
In particular:
This function:
private boolean resolve(ClassNode type)
is called with a ClassNode where name="Helper.num", superClass = java.lang.Object, and everything else is null. Is ClassNode supposed to represent a class? If so, it's probably an error that the name is "Helper.num" and not, say, Helper.