Description
The following code throws a GroovyBugError:
print "Foo" ===~ ".*"
but this seems wrong to me. A GroovyBugError, as I understand it, is supposed to be only thrown for internal compiler errors, meaning that there is a bug in the compiler. This seems to me to be a candidate for a SyntaxError.
It seems that there is a simple fix. In the default block of org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.eval(BinaryExpression), change throws new GroovyBugError(..) to throws new SyntaxException(..).
I only tried this on Groovy 2.0.0 beta 3 and Groovy 1.8.6.