Cyclic definition of overriding
Konstantin
konstantin.barzilovich at oracle.com
Tue Jun 9 15:00:51 UTC 2015
Hello,
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-8.4.8.1-200.
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-8.4.8.1-200-D says about inheriting.
"8.4.8.1 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.
Thanks,
Konstantin
More information about the compiler-dev
mailing list