This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/13513] New: problems with static inner classes of interfaces


[forwarded from http://bugs.debian.org/225434]

rechecked with 3.3 branch and 20031229 CVS HEAD.

the compilation of 
 
A.java: 
interface A { 
    static class B { 
    } 
} 
 
C.java: 
interface C extends A { 
    B getB(); 
} 
 
D.java: 
class D { 
    public static void main (String[] argv) { 
        Object o = new C() { 
                public B getB() { 
                    return new B(); 
                } 
        }; 
    } 
} 
 
dies with 
 
C.java:2: error: Type `B' not found in the declaration of the return 
type of method `getB'. 
       B getB(); 
       ^ 
1 error 
./C.java:2: error: Type `B' not found in the declaration of the return 
type of method `getB'.
       B getB(); 
       ^ 
D.java:4: error: Type `B' not found in the declaration of the return 
type of method `getB'. 
                public B getB() { 
                          ^ 
2 errors 
 
 
It works with the advertized as very standard compliant jikes, so i 
assume this may be an error of gcj-3.3.

-- 
           Summary: problems with static inner classes of interfaces
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13513


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]