Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8-beta-3
-
None
Description
class X { private A a = new A() public B b public X() { b = new B() { public String getFoo() {a} } } } class A {} class B { B(){getFoo()} def getFoo(){} } def x = new X()
The code above fails with
Caught: java.lang.NullPointerException at X$1.propertyMissing(TryGroovy.groovy) at X$1.getFoo(TryGroovy.groovy:6) at X$1.getFoo(TryGroovy.groovy) at B.<init>(TryGroovy.groovy:13) at X$1.<init>(TryGroovy.groovy) at X.<init>(TryGroovy.groovy:5) at TryGroovy.run(TryGroovy.groovy:16)