Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.3
-
None
-
Windows 7, Java 6, Groovy 2.1.3
Description
Execute the following code, it will throw the exception. You can replace the values 1 and [] with any two incompatible types.
MyClass.groovy
@groovy.transform.CompileStatic class MyClass { public static void main(String[] args) { Object o = getObject() if(o == null) { o = 1 } else { println o.toString() } } public static Object getObject() { '' } }