Details
Description
Repro:
Compile
interface Foo { public <N extends Number> void foo() }
Result:
unexpected token: public @ line 2, column 5.
public <N extends Number> void foo()
^
Making Foo an abstract class avoids the problem:
abstract class Foo { public abstract <N extends Number> void foo() }
Issue Links
- is depended upon by
-
GROOVY-4908
Improved compiler checking/error messages required when checking interfaces with generics
-
I have put in a fix and done some initial testing. Any further testing you can do would be great. Now that this is fixed, it reveals some additional checks we need to do in the compiler regarding generics that haven't been completed before now. I am expecting those checks to be done as part of fixing GROOVY-4908.