Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-3
-
None
-
None
Description
The example below works as expected (printing 1) when main is invoked after running groovyc. The same code fails to work correctly, throwing an AbstractMethodError, when the script is running using groovy.
— Base.java ---------------------
abstract public class Base
{
abstract int foo();
}
-Subclass1.groovy-------------
class Subclass1 extends Base
{
int foo()
// when invoked after running groovyc, this works correctly
static void main(String[] args)
}
Base b = new Subclass1();
System.out.println(b.foo());
// when invoked via groovy on the command line, this fails.
// "Caught: java.lang.AbstractMethodError: Subclass1.foo()I"