Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0-beta-3
-
Fix Version/s: 2.0.4, 2.1.0-beta-1, 1.8.9
-
Component/s: Stub generator / Joint compiler
-
Labels:None
-
Environment:2.0.0-beta-3-SNAPSHOT, JDK 1.7
-
Number of attachments :
Description
The following class definition fails to compile the Java stubs:
class GenericReturn {
public <T extends List> T foo() {
null
}
}
Error:
tmp/groovy-java-stubs/GenericReturn.java:16: error: incompatible types
public <T extends java.util.List> T foo() { return (java.util.List)null;}
^
required: T
found: List
where T is a type-variable:
T extends List declared in method <T>foo()
It compiles with no errors on 2.0-beta-2 and 1.8.6