Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.0
-
None
-
None
Description
Running
{ println "foo" }in the groovyConsole results in the compiler error message "Closure expression looks like it may be an isolated open block.;
solution: Add an explicit parameter list, as in
"Expression could be either a closure expression or an isolated open block. Solution: Add an explicit parameter list, as in {it -> ...}
, to create a closure or label it as L:
{...}to mark it as block."