Description
Code like following:
interface B { public static final CONST = "a" } class C implements B { } @groovy.transform.CompileStatic class A { public static final CONST = "a" public static List doSomething() { return (0..1).collect{ int x -> (0..1).collect{ int y -> return C.CONST } } } } println A.doSomething()
fails with this compilation error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
test.groovy: 16: Access to C#CONST is forbidden @ line 16, column 12.
return C.CONST
^
1 error