Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6-rc-1, 1.6-rc-2
-
None
-
None
Description
This script:
for(myVal in evaluate('[10,11,12]', 2, 'foo') { [10,11,12] }) { println myVal } def evaluate(text, num, thing, closure) { closure.call() }
Produces:
Exception thrown: $const$1 java.lang.NoSuchFieldError: $const$1 at ConsoleScript1$_run_closure1.doCall(ConsoleScript1:1) at ConsoleScript1$_run_closure1.doCall(ConsoleScript1) at ConsoleScript1.evaluate(ConsoleScript1:6) at ConsoleScript1$evaluate.callCurrent(Unknown Source)
Whilst this one that has a String inside the closure works fine:
for(myVal in evaluate('[10,11,12]', 2, 'foo') { "one" }) { println myVal } def evaluate(text, num, thing, closure) { closure.call() }
Attachments
Attachments
Issue Links
- is duplicated by
-
GROOVY-3368 Collection.sort{Closure} regression
- Closed