Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Consider the following:
abstract class A { protected Object thing = 'field' String getThing() { 'property' } } @groovy.transform.CompileStatic class C extends A { void test() { print thing.toUpperCase() } } new C().test()
If ".toUpperCase()" is removed, the script prints "property". However the STC type recorded comes from the field.
Attachments
Issue Links
- relates to
-
GROOVY-10985 Precedence of self property over outer class field
- Closed
-
GROOVY-11007 STC: instanceof guard for property loses type information
- Closed