[kaffe] Bug [CVS version]: Calling non-implemented method in abstract class

Ito Kazumitsu ito.kazumitsu at hitachi-cable.co.jp
Tue Apr 8 20:25:01 PDT 2003


In message "Re: [kaffe] Bug [CVS version]: Calling non-implemented method in abstract class"
    on 03/04/08, Timothy Stack <stack at cs.utah.edu> writes:

> > Apparently, Kaffe doesn't like when an abstract class calls a method 
> > from an interface the abstract class implements, if the abstract class 
> > does not implement that method itself.
> 
> CVS update and give it a go.

The CVS version works for the original Bug.java, but still
causes NoSuchMethodError for the following code compiled
with Sun's javac.

public class Bug {
     interface SupInterface {
        void foo();
     }

     interface Interface extends SupInterface {
     }

     static abstract class Abstract implements Interface {
        public void bug() { foo(); }
     }

     static abstract class Abstract2 extends Abstract {
     }

     static class Impl extends Abstract2 {
        public void foo() {}
     }

     public static void main(String[] args) {
          (new Impl()).bug();
     }
}


java.lang.NoSuchMethodError: Bug$Abstract.foo()V
        at Bug$Abstract.bug(Bug.java:10)
        at Bug.main(Bug.java:21)




More information about the kaffe mailing list