Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-4
-
None
-
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
Description
This code:
i = 40 % 7
Causes this exception:
>>> caught a bug:
>>> uncaught exception during class generation phase on [bug.groovy]: org.codehaus.groovy.classgen.ClassGeneratorException: Operation: [Token ("%"): text=%,type=260,interpretation=260] not supported
>>> stacktrace:
org.codehaus.groovy.classgen.ClassGeneratorException: Operation: [Token ("%"): text=%,type=260,interpretation=260] not supported
at org.codehaus.groovy.classgen.ClassGenerator.visitBinaryExpression(ClassGenerator.java:1032)
at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:76)
at org.codehaus.groovy.classgen.ClassGenerator.visitAndAutobox(ClassGenerator.java:2369)
at org.codehaus.groovy.classgen.ClassGenerator.evaluateEqual(ClassGenerator.java:2317)
at org.codehaus.groovy.classgen.ClassGenerator.visitBinaryExpression(ClassGenerator.java:922)
at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:76)
at org.codehaus.groovy.classgen.ClassGenerator.visitReturnStatement(ClassGenerator.java:849)
at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:70)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:108)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:79)
at org.codehaus.groovy.classgen.ClassGenerator.visitMethod(ClassGenerator.java:325)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:626)
at org.codehaus.groovy.classgen.ClassGenerator.visitClass(ClassGenerator.java:257)
at org.codehaus.groovy.tools.Compiler.generateClasses(Compiler.java:345)
at org.codehaus.groovy.tools.Compiler.compile(Compiler.java:250)
at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:107)
at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:97)
at org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
at org.codehaus.classworlds.Launcher.main(Launcher.java:474)
Attachments
Issue Links
- relates to
-
GROOVY-10786 Cannot call modulo operator (%) on BigDecimal types
- Closed