Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.0-JSR-1
-
None
-
None
-
win xp /all
Description
#test.gy
def sayHello(){
println "sayHello"
}
def h = &sayHello // the parser does not seem to recognize this new method
//pointer syntax.
def x = this.&sayHello // Works though!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- exception trace
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
D:\lab\groovy>groovy test.gy
Caught: General error during parsing: unexpected token: &
D:\lab\groovy\test.gy:5:9: unexpected token: &
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.multiplicativeExpre
ssion(GroovyRecognizer.java:10568)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.additiveExpression(
GroovyRecognizer.java:10184)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.shiftExpression(Gro
ovyRecognizer.java:8041)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.relationalExpressio
n(GroovyRecognizer.java:9992)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.equalityExpression(
GroovyRecognizer.java:9934)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.regexExpression(Gro
ovyRecognizer.java:9884)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.andExpression(Groov
yRecognizer.java:9854)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.exclusiveOrExpressi
on(GroovyRecognizer.java:9824)
at org.codehaus.groovy.antlr.parser.GroovyRecognizer.inclusiveOrExpressi