THE PROBLEM:
{code}
@Typed package pwn
"Some text".with {println it}
{code}
outputs null
{code}
@Typed package pwn
"Some text".with {String it->println it}
{code}
Doesn't compile because of "Cannot find method String.with({ String -> ...})"
error.
THE SUGGESTION:
At compile time convert this code to
{code}
String someTemporaryVariableNotPresentInOuterContext = "Some text"
println someTemporaryVariableNotPresentInOuterContext
{code}
and so on for more complex cases
Original issue reported on code.google.com by justn...@mail.ru on 12 Aug 2011 at 12:04
Original issue reported on code.google.com by
justn...@mail.ru
on 12 Aug 2011 at 12:04