PR java/21436: imported type name for superclass, with multifile compilation

Tom Tromey tromey@redhat.com
Tue May 10 16:35:00 GMT 2005


>>>>> "Paolo" == Paolo Bonzini <bonzini@gnu.org> writes:

>> class Yeah extends T151221am2c {
>> public void m() { System.out.println("Yeah"); }
>> }

Paolo> Right.  I wouldn't have thought that interfaces can be (mis)used to
Paolo> override visibility modifiers in the base class, though...

Inheriting multiple abstract methods, as in your example from Jacks,
is a strange case.  In this situation the class is said to inherit all
the abstract methods, and none overrides any other.  That means that
the visibility checks are not done.  In that example you can still
make a concrete subclass of that class by declaring the overriding
method as 'public'; necessarily so as methods declared in an interface
are implicitly 'public'.

HTH,
Tom



More information about the Java-patches mailing list