Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0, 2.3.1
-
None
Description
Cannot compile this code in 2.3.0.
import groovy.transform.CompileStatic @CompileStatic class ForInTest { static interface List2<E> extends List<E> {} static class ArrayList2<E> extends ArrayList<E> implements List2<E> {} static List2 list = new ArrayList2() static void main(String[] args) { for (def e in list) {} } }
The error message is this.
Line 10, expecting casting to java.util.Iterator <E extends java.lang.Object> but operand stack is empty
Maybe this problem is related to GROOVY-6791