Kaffe compiler bug with anonymous inner classes.

Godmar Back gback at cs.utah.edu
Tue Aug 4 09:05:36 PDT 1998


 Scott,

The "kaffe compiler (1.00)" is actually Pizza; make sure you report such 
bugs to pizza at cis.unisa.edu.au.  You might also want to check their webpages
whether that problem is already known.

	- Godmar

> 
> // The kaffe compiler (1.00) flags a bogus fatal error when compiling this
> // class.  sun's javac does just fine (1.1.6).
> //   -- C. Scott Ananian <cananian at alumni.princeton.edu>
> class TestK {
>   // Reference the anonymous object before we declare it.
>   // (if we move this method last, there are no problems.)
>   public String toString() { return this.o.toString(); }
>   // Gratuitous anonymous object/class.
>   public static final Object o = (new Object() {});
>   // This *is* legal java.
>   // kaffe complains:
>   //  Test/TestK.java:9: duplicate definition of constructor
>   //  TestK$$anonymous_class0() in class TestK.$anonymous_class1
>   //    public static final Object o = (new Object() {});
>   //                                        ^
> }
> 
> /* ----- Who says software isn't speech? ------------ */
> 
> 



More information about the kaffe mailing list