Cyclic definition of overriding

Konstantin konstantin.barzilovich at
Wed Jun 10 16:23:34 UTC 2015

Thanks for the answers.

First of all, sorry for meaningless names. We can use I1, I2 and SubClass.

As I understand, you said that we should use chapter 9, not 8.
Could you clarify, why can't I consider I1 with SubClass, which inherit  
method m2 from I2?
Is it important, from what type is overriding?

May be jls-8.4.8-200-E should be:

There exists no method m' that is a member of the direct superclass or a  
direct superinterface, D', of C (m distinct from m', D distinct from D'),  
such that m' from D' overrides the declaration of the method m.

If there will be no mention of superinterfaces in this assertion, the  
problem would be solved.


>> On Jun 9, 2015, at 3:38 PM, Alex Buckley <alex.buckley at>wrote:
>> On 6/9/2015 2:27 PM, Dan Smith wrote:
>>>> On Jun 9, 2015, at 3:12 PM, Alex Buckley <alex.buckley at>
>>>> wrote:
>>>> On 6/9/2015 1:36 PM, Alex Buckley wrote:
>>>>> Knowing to apply rather than is extremely subtle.
>>>>> Once you do, it's plain that 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 and 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' (, the declaration
>>>> of the method m." -- note the relocation of "from D'".
>>>> (Plus class Test needs to be abstract of course.)
>>> Yes, this is good. "From D' overrides" is awkward.
>>> The confusion isn't so much about Chapter 8 vs. Chapter 9 -- both
>>> immediately assert that Test1 is a subclass/subinterface of Test2.
>>> The problem is in recognizing that D' (Test1) is not the same as D
>>> (Test), which this change makes more clear. (Hope I'm not mixing up
>>> Test1 and Test2 here, but if so, you know what I mean.)
>> ... that D' (Test1) is not the same as D (Test2). (Yes, maybe D isTest1  
>> and D' is Test2.)
> Ugh, sorry. No, I really mean "Test". "Is not the same as C (Test)".That  
> is, the example ceases to be interesting/confusing once you realizethat  
> the dependency on overriding is from the perspective of the 
> superinterface, not the class whose members are still being determined.
> —Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the compiler-dev mailing list