Details
Description
As discussed into the mailing list the following snippet makes the groovy compiler complain for
[Static type checking] - Cannot return value of type W on method returning type W
even if it is valid groovy code
snippet.groovy
import groovy.transform.TypeChecked class Wrapper {} @TypeChecked class Foo<W extends Wrapper> { W doIt (List<W> l) { l.iterator().next()//Static type check failure } } //new Foo().doIt([])//uncomment this line to run as a script on groovyConsole