This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR java/21436: imported type name for superclass, with multifile compilation
- From: Tom Tromey <tromey at redhat dot com>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 10 May 2005 10:32:58 -0600
- Subject: Re: PR java/21436: imported type name for superclass, with multifile compilation
- References: <4280B2FF.6040508@berger.to> <d5qens$jah$1@sea.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "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