Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
Windows 7 Home Premium
Description
@Test @TypeChecked void testForEach() { int i = 0; for (Field field : String.class.declaredFields) { i++; } assert i > 0 }
fails on compile time with
[Static type checking] - Cannot loop with element of type java.lang.reflect.Field -> java.lang.reflect.Field with collection of type java.lang.ref.SoftReference <T extends java.lang.Object -> java.lang.Object>