mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
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:
+14
@@ -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() {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user