Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
2.0-rc-2
-
None
-
None
Description
Example:
import groovy.transform.CompileStatic @CompileStatic File foo() { if(true) { return new File("blah") } return null }
This results in
[Static type checking] - Cannot return value of type java.lang.Object on method returning type java.io.File -> java.io.File at line: 8, column: 10