Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.4, 2.4.0-beta-3
-
None
Description
The following code works fine from Java but fails in Groovy:
public abstract class FooMain { private FooMain() {} public abstract String bar(); public static FooMain factory() { return new FooMain() { public String bar() { return "xxx"; } }; } public static void main(String[] args) { System.out.println(factory().bar()); } } // => java.lang.IllegalAccessError: tried to access method FooMain.<init>()V from class FooMain$1