Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
Description
Example:
@groovy.transform.CompileStatic def foo() { Thread.start { println "boo" } } foo()
Produces
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'class java.lang.Thread' with class 'java.lang.Class' to class 'java.lang.Thread' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:360) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:599)