Consider the following:
def a = m();
{ -> println a }
// or
def b = '123';
{ -> b = 123 }
When saving the editor with the "Remove unnecessary semicolons" save action enabled, the semicolon is removed and the closure becomes associated with the method call.
Consider the following:
When saving the editor with the "Remove unnecessary semicolons" save action enabled, the semicolon is removed and the closure becomes associated with the method call.