Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
5.0.0-alpha-8
-
None
Description
The test case described in GROOVY-10985 fails to execute as expected under static compilation if a single reference to the private outer class field is introduced.
@groovy.transform.CompileStatic class Outer { private static int VALUE = 1 class Inner { // NOTE: adding static stops use of bridge method def getProperty(String name) { if (name == "VALUE") return 2 } void test() { if (Outer.VALUE > 0) print 'positive' // creates private access bridge print VALUE // classgen now targets private access bridge } } void test() { new Inner().test() } } new Outer().test()
Attachments
Issue Links
- is related to
-
GROOVY-7304 Cannot mutate private field from within an AIC or a closure
- Closed
-
GROOVY-10985 Precedence of self property over outer class field
- Closed
-
GROOVY-11198 access to public static variable forbidden in enum
- Closed