Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.0-rc-1
-
None
-
None
Description
The following code:
@groovy.transform.CompileStatic class Test { static List<String> a( String s ) { s.with { String it -> [ "$it" ] } } } assert Test.a( 'tim' ) == [ 'tim' ]
Gives the error:
[Static type checking] - Cannot return value of type java.lang.Object on method returning type java.util.List <String> at line: 4, column: 5