Cyclic definition of overriding
Alex Buckley
alex.buckley at oracle.com
Tue Jun 9 21:12:18 UTC 2015
On 6/9/2015 1:36 PM, Alex Buckley wrote:
> Knowing to apply 9.4.1.1 rather than 8.4.8.1 is extremely subtle. Once
> you do, it's plain that Test1.foo() does not override-from-Test1 the
> method foo() declared in Test2, and vice versa, thus class Test inherits
> both foo() methods (harmlessly). I will add cross-refs from 8.4.8 to
> both 8.4.8.1 and 9.4.1.1 to clarify.
In particular, the 8.4.8 clause:
"such that m' from D' overrides the declaration of the method m."
should read:
"such that m' overrides from D' (8.4.8.1, 9.4.1.1) the declaration of
the method m." -- note the relocation of "from D'".
(Plus class Test needs to be abstract of course.)
Alex
More information about the compiler-dev
mailing list