Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0-beta-1
-
None
Description
Base.groovy
class Base<T> {
void foo(T t) {}
}
Derived.groovy
class Derived extends Base<String> { @Override void foo(String s) {} }
Compile error:
Error:(2, 3) Groovyc: Method 'foo' from class 'Derived' does not override method from its superclass or interfaces but is annotated with @Override.
Removing the @Override annotation appears to solve the problem. Earlier Groovy versions (e.g. 2.0.x) didn't have this problem. Tested with latest groovy-all-2.3.0-SNAPSHOT.