Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.0.0-alpha-1, 5.0.0-alpha-2
-
None
Description
With static compilation, accessing a public static class variable within an enum causes a compilation error.
import groovy.transform.CompileStatic @CompileStatic // compiles without this class PublicStaticInEnum { public static double FOO = 0.0d // compiles without "public" enum MyEnum { FOO_VAL(FOO) // Access to example.PublicStaticInEnum$MyEnum#FOO is forbidden double myDouble MyEnum(double myDouble) { this.myDouble = myDouble } } }
This example fails to compile with: Access to example.PublicStaticInEnum$MyEnum#FOO is forbidden
Attachments
Issue Links
- is related to
-
GROOVY-7994 Anonymous inner class believes protected method in parent's superclass returns Object
- Closed
-
GROOVY-7024 Reference to static member of parent class in enum constructor fails at runtime
- Closed
- relates to
-
GROOVY-11412 SC: outer class field and self dynamic property
- Closed