Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Groovy Version: 1.0 JVM: 1.5.0_10-b03
-
Testcase included:yes
-
Number of attachments :
Description
See the attached test case
Issue Links
- is depended upon by
-
GROOVY-2503
MOP 2.0 design inflluencing issues
-
The bug is still around
class Foo { def aproperty def getAproperty() { this.@aproperty ? this.@aproperty : 'a default value' } def test(){ def other = this assert other.@aproperty == this.@aproperty assert other.aproperty == "a default value" assert this.aproperty == null // ??? // thw folowing line fails assert other.aproperty == this.aproperty } } def foo = new Foo() foo.test()What's weird about this is that is seems there may be an optimization while accessing properties with 'this' as it yields the filed vlaue right away, but with 'other' it follows the long path.