include tree ancestors in type parameters iterable (IDEA-179958)

anonymous and local classes are inner classes which are not members of any other class, they are implicitly generics if applicable
This commit is contained in:
Anna.Kozlova
2017-10-10 18:17:29 +02:00
parent 4e3b7b9508
commit 8b84f7ab8e
4 changed files with 32 additions and 5 deletions
@@ -1,4 +1,18 @@
class C {
static class MyThrowable<T> extends <error descr="Generic class may not extend 'java.lang.Throwable'">Throwable</error> { }
void test() throws <error descr="Generic class may not extend 'java.lang.Throwable'">MyThrowable<Integer></error> { }
private class GenericOuter<T> {
public final Exception exn = new <error descr="Generic class may not extend 'java.lang.Throwable'">Exception</error>() { };
{
class LocalExn extends <error descr="Generic class may not extend 'java.lang.Throwable'">Exception</error> {}
throw new <error descr="Generic class may not extend 'java.lang.Throwable'">RuntimeException</error>(){};
}
}
public <X> void genericMethod() {
class LocalExn extends Exception {}
throw new RuntimeException() {};
}
}