This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: Problems with calling inherited methods
- To: edgar at villanueva dot com
- Subject: Re: Problems with calling inherited methods
- From: Mark Wielaard <mark at klomp dot org>
- Date: Sun, 14 Jan 2001 22:30:35 +0100
- Cc: "'java-discuss at sources dot redhat dot com'" <java-discuss at sources dot redhat dot com>
- References: <3A61C345.76A40F02@home.com>
Hi,
On Sun, Jan 14, 2001 at 10:18:29AM -0500, Edgar Villanueva wrote:
> There's a problem with compiling classes that call inherited methods.
>
> Here is a class that shows the problem.
>
> import java.util.*;
>
> public class MyLinkedList extends LinkedList
> {
> public static void main(String args[])
> {
> MyLinkedList t = new MyLinkedList();
> if (t.isEmpty())
> System.out.println("list is empty");
> else
> System.out.println("list has something");
> }
> }
This seems to be fixed in the latest version from CVS.
(gcc version 2.97 20010112)
The above example compiles correctly for me.
And it gives the (correct) output 'list is empty'.
Thanks,
Mark