GCJ can't find methods in nested interfaces

Jeff Sturm jsturm@sigma6.com
Tue Oct 26 14:15:00 GMT 1999


This has been driving me crazy for a couple of weeks... finally I
narrowed it down to a small test case.  Can somebody with an up-to-date
gcj compiler try this code and see if it fails?  (I'm still on 09/24,
haven't had much luck building recent updates.)

A.java
======
interface A {
        void f();
}

B.java
======
interface B extends A {
        void g();
}

T.java
======
class T {
    void perform(B b) {
        b.f();
        b.g();
    }
}

Compiling to object code is OK.  Compiling to class files fails:

[jsturm@toronto tmp]$ gcj -C *.java
T.java: In class `T':
T.java: In method `perform(B)':
T.java:3: Can't find method `f()' in class `B'.
                b.f();

It seems the presence of the .class files confuses gcj.  If this hasn't
yet been fixed I'll file a bug report.


-- 
Jeff Sturm
jsturm@sigma6.com


More information about the Java mailing list