Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0-beta-1
-
None
Description
Static type checker should check calls to closure parameters with provided @ClosureParams information:
@CompileStatic void foo(@ClosureParams(value = FromString, options = "java.lang.Number") Closure cl) { cl("a") //Compilation should fail here }
Of course, these checks are not applicable to reassigned parameters, but in most cases closure parameters are not reassigned.