Consider the following:
package test30
import groovy.transform.CompileStatic
@CompileStatic
trait T {
String getFoo() { 'foo' }
}
package test30
import groovy.transform.CompileStatic
@CompileStatic
class A implements T {
}
package test30
import groovy.transform.CompileStatic
@CompileStatic
class B extends A {
}
And:
package test30
import groovy.transform.CompileStatic
@CompileStatic
class Test30 {
static void main(args) {
println new B().foo
}
}
Greclipse is reporting an error on B:
Groovy:Can't have an abstract method in a non-abstract class. The class 'test30.B' must be declared abstract or the method 'java.lang.String getFoo()' must be implemented.
I don't expect this error. Also, the Groovy compiler seems to compile this code and if I run Test30 I get the expected result.
Consider the following:
And:
Greclipse is reporting an error on B:
I don't expect this error. Also, the Groovy compiler seems to compile this code and if I run
Test30I get the expected result.