Cyclic definition of overriding
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Jun 9 20:41:59 UTC 2015
On 09/06/15 21:15, Dan Smith wrote:
> The fact that inheritance depends on overriding is due to how default methods work: you don't inherit a default method if it has already been overridden. But note the "already" -- there's some induction going on here, building up the members of all supertypes before we attempt to decide the members of a subtype. The rules for subtypes depend only on what we already know about supertypes.
I thought that membership/inheritance has always depended on overriding
- i.e. a method m is inherited from a class C only if m is not
overridden in some subclass of C. I think some rules along those lines
were there even before default methods?
Maurizio
More information about the compiler-dev
mailing list