Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.5.2
-
Component/s: None
-
Labels:None
-
Environment:Ubuntu 6.06 LTS "Dapper Drake" + JDK 1.5.0_06 + Groovy r4101
-
Number of attachments :
Description
The script:
final groovyHome = System.getenv ( 'GROOVY_HOME' ) ; { assert groovyHome != '' }
gives a reasonable error message. However, the script:
( new GroovyShell ( ) ).evaluate ("final groovyHome = System.getenv ( 'GROOVY_HOME' ) ; { assert groovyHome != '' }")
gives the almost incomprehensible:
Caught: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed,
at parseError.run(parseError.groovy:1)
at parseError.main(parseError.groovy)
A similar error message is now generated in both cases so in that respect things are fixed. However, is the error message:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, ./GROOVY_1527.groovy: 3: Closure expression looks like it may be an isolated open block.;
solution: Add an explicit parameter list, as in {it -> ...}, or label it as L:{...}. @ line 3, column 54.
em.getenv ( 'GROOVY_HOME' ) ; { assert g
^
for the first script actually reasonable?