This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]