enclosing instance check: don't check the inheritance for the class with extends/implements itself

This commit is contained in:
Anna.Kozlova
2017-03-08 19:15:20 +01:00
parent 472660a3b0
commit 92d60ede85
3 changed files with 26 additions and 4 deletions
@@ -2,4 +2,18 @@ class Outer {
class Inner extends Outer {}
}
class Impl extends <error descr="No enclosing instance of type 'Outer' is in scope">Outer.Inner</error> {}
class Impl extends <error descr="No enclosing instance of type 'Outer' is in scope">Outer.Inner</error> {}
class Impl1 {
class InnerImpl extends <error descr="No enclosing instance of type 'Outer' is in scope">Outer.Inner</error> {}
}
class Impl2 extends Outer {
{
class <warning descr="Local class 'L' is never used">L</warning> extends Outer.Inner {}
}
class In extends Outer.Inner {}
static class In1 extends <error descr="No enclosing instance of type 'Outer' is in scope">Outer.Inner</error> {}
}