I believe this is a known bug/limitation with an existing Jira.
On Fri, Dec 8, 2017 at 5:39 AM, Nathan Harvey <[email protected]>
wrote:
> Apologies, the mailing list removed my code (forum, anyone?). Here it is:
>
> @CompileStatic
> class SampleClass {
> public void sample(Consumer<String> consumer) {}
> public static void main(String[] args) {
> new SampleClass().sample({ String str -> str.toUpperCase()
> }) // passes
> new SampleClass().sample({ it.toUpperCase() }) // passes
> new SampleClass().sample({ str -> it.toUpperCase() }) //
> fails
> }
> }
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>