Hi Graeme, Speaking of annotations, in Java 8, there's "repeated annotations" which hasn't yet been implemented.
Now onto your question... On Thu, Dec 15, 2016 at 8:52 AM, Graeme Rocher <graeme.roc...@gmail.com> wrote: > With all the grammar improvements happening, one that has always > bothered me is having to do this: > > @IgnoreIf( { System.getenv('TRAVIS') } ) > def foo() {} > > Instead of > > @IgnoreIf { System.getenv('TRAVIS') } > def foo() {} > > Could this be improved with the new grammar? Or are there still > ambiguity issues? > Indeed that would be nicer, but... (although it's not supported today), we'd like to be able to also annotate closures. @IgnoreIf( {...} ) is indeed an annotation with a closure parameter, but @Foo {...} could be an annotated closure. What's interesting with allowing annotations pretty much anywhere is that AST xforms could also be applied anywhere annotations are allowed. So this would open some interesting perspectives for AST transformations. -- Guillaume Laforge Apache Groovy committer & PMC Vice-President Developer Advocate @ Google Cloud Platform Blog: http://glaforge.appspot.com/ Social: @glaforge <http://twitter.com/glaforge> / Google+ <https://plus.google.com/u/0/114130972232398734985/posts>