interfaces and sub-class implementations

Bryce McKinlay bryce@waitaki.otago.ac.nz
Sun Apr 21 20:30:00 GMT 2002


Nic Ferrier wrote:

>I found a few problems with source and native compilation where
>interface methods not being implemented by the implementing class.
>
>I'll report these later on (probably after the 3.1 release unless
>people are desperate for bugs to fix /8-) but here's the jist:
>
>
>  public interface Thingy
>    public void someOperation (int x);
>    public int anOperation (String x);
>
>  public abstract class DooDah
>    implements Thingy
>
>    public void someOperation (int x)
>    { }
>
>
>  public class ThingumyJig extends DooDah
>    public int anOperation (String x)
>    {
>      return "ha!";
>    }
>
>
>The above (or something analagous to the above) won't source compile.
>


I tried this and it worked for me with 3.2 20020411. I had to modify it 
slightly to get it to compile. If you could post an actual test case 
that fails with the bug report, that would be great. I know that GCJ has 
a few issues with abstract methods and bytecode but I'm not aware of any 
problems with pure source-to-native compilation.

regards

Bryce.




More information about the Java mailing list