[java] connect resolution of generics in resource closer method (IDEA-150607)

This commit is contained in:
Roman Shevchenko
2016-01-20 12:43:56 +01:00
parent 88876357c6
commit d8b29b8401
2 changed files with 33 additions and 18 deletions
@@ -20,6 +20,8 @@ class C {
}
}
interface GenRT extends Gen<RuntimeException> { }
void m1() {
try (MyResource r = new MyResource()) { r.doSomething(); }
catch (E1 | E2 | E3 ignore) { }
@@ -87,4 +89,8 @@ class C {
void m5() {
try (<error descr="Unhandled exception from auto-closeable resource: C.E2">Gen<E2> gen = new Gen.Impl()</error>) { }
}
void m6() {
try (GenRT gen = null) { }
}
}