Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 1.8.4
-
Fix Version/s: None
-
Component/s: Compiler, Groovy Console
-
Labels:
-
Environment:Windows 7 (64 bit)
-
Testcase included:yes
-
Number of attachments :
Description
The following script:
@Grab( group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.1' )
println "x"
yields "unexpected token: println at line: 3, column: 1"
However, inserting "def z" in a line before println compiles correctly. Oddly, adding parenthesis:
@Grab( group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.1' )
println ("x")
changes the error to: unexpected token: x at line: 3, column: 10
So, I expect there's something about the syntax of @Grab (or @?) that is allowing for the possibility of more text related to it such that the method 'println' is ambiguous but 'def' clearly terminates the @Grab and starts a new element. A minor thing, but confusing.
Activity
blackdrag blackdrag
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Jochen Theodorou [ blackdrag ] | |
| Resolution | Fixed [ 1 ] |
blackdrag blackdrag
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
blackdrag blackdrag
made changes -
| Status | Reopened [ 4 ] | Closed [ 6 ] |
| Resolution | Won't Fix [ 2 ] |