Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-6
-
None
-
Win-XP, Sun JDK 1.4 .2_05
Description
I tried to define this method in groovy:
public lsum( elems ) {
sum = 0
for (i in elems)
return sum
}
elems = []
for (i in 0..999) {
elems.add
}
result = lsum(elems)
But executing this in GroovyConsole generated the following error:
Exception thrown: java.lang.VerifyError:
(class: Script0, method: lsum signature: (Ljava/lang/Object;)Ljava/lang/Object
Inconsistent stack height 4 != 2
As a result, this code would not even run.