groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject RE: `this` in static context
Date Mon, 06 Nov 2017 17:45:13 GMT
For sure , "this" and "super" are supported within a closure defined in a static context. 
Are you saying they also work directly in a static method?  Given "class A { static main(args}
{ this } }", this should be of type "Class<A>" if it is indeed supported.  It follows
that it would work, since you can call directly methods on Class<A> from that scope,
like getCanonicalName().
View raw message