Compile errors with super.

Bryce McKinlay bryce@mckinlay.net.nz
Mon Dec 1 02:15:00 GMT 2003


On Dec 1, 2003, at 6:57 AM, Rutger Ovidius wrote:
> Hi, I'm having trouble understanding a few compile errors. I guess I 
> can best explain
> it with an example:
>> public class One {
> public Object A() {
> return new Object();
> }
> }
> public class Two extends One {
> public void B () {
> Object obj = Two.super.A();
> }
> public static void main(String[] args)
> {}
> }
>> gcj -c *.java
>> Two.java:5: error: 'class' or 'this' expected.
> Object obj = Two.super.A ()

This looks like a gcj bug handling qualified "super". I checked and 
couldn't find an existing bug report on this. Could you file one?
Thanks
Bryce.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /