Description
If an anonymous inner class is defined inside of a static method, "this" does not reference what it should:
Demo.groovy
class Demo { static void main(arg) { def r = new Runnable() { void run() { if(this instanceof Runnable) { println 'Yep' } else { println 'Nope' } } } r.run() } }
$ groovy Demo Nope
2.3.3 is the only version I have tested this with.