Cyclic definition of overriding

Konstantin konstantin.barzilovich at
Tue Jun 9 15:00:51 UTC 2015


I consider this simple case:

interface Test1  {
     int foo(); // m1

interface Test2{
     int foo(); // m2
class Test implements Test1, Test2{

I try to understand if m1 is inherited by Test. I follow jls-8.4.8-200.
All subassertions are true except jls-8.4.8-200-E. To decide if it is true  
or not we need to turn to overriding definition jls-
More detailed, I want to be sure that m2 isn't m'. That's why I need to  
know if m2 overrides m1.
And new subassertion jls- says about inheriting.
" C does not inherit mI."
So we get a circle. In order to understand if m1 is inherited we need to  
know if it is inherited.
Please correct me if i misunderstand anything.


More information about the compiler-dev mailing list