Details
Description
I was creating a small benchmarking for BigDecimal operations under @CompileStatic and after a nested loop the following message came:
Caught: BUG! exception in phase 'class generation' in source unit '/media/CHRONICLES/info/groovy/scripts/BugG2b3.groovy' At line 13 column 13 On receiver: curr.call() with message: minus and arguments: t0 This method should not have been called. Please try to create a simple example reproducing this error and filea bug report at http://jira.codehaus.org/browse/GROOVY BUG! exception in phase 'class generation' in source unit '/media/CHRONICLES/info/groovy/scripts/BugG2b3.groovy' At line 13 column 13 On receiver: curr.call() with message: minus and arguments: t0 This method should not have been called. Please try to create a simple example reproducing this error and filea bug report at http://jira.codehaus.org/browse/GROOVY
Happens with or without --indy, and with or without indy jar.
Happens only with @CompileStatic.
Commenting the 5.times { "solves" the problem.
Swapping the "5.times" by
for (int i = 0; i < 5; i++)
or by
for (i in 1..5)
or
(1..5).each
doesn't solve the problem.