Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.0.4
-
None
-
None
Description
Consider the following:
A.java
package p; public class A { public interface I { } }
B.groovy
package q import p.A class B extends A { static I maker() { return new I() {} // error: unable to resolve class I } }
The inner class "I" can be resolved for return type and class/variable expression (see GROOVY-8364). However the anonymous inner class usage is reporting an error. If "I" were a static inner class, it could be used in constructor call expression "new T()" but fails for "new T() {}".