fix precise catch types calculation (IDEA-200795)

fixes false positive in "Redundant throws clause" inspection
fixes bad code is green: unhandled exception

GitOrigin-RevId: 232b2a0086422b5fd5cfb7b7d45c7cbbbb1bd296
This commit is contained in:
Bas Leijdekkers
2021-08-13 15:07:00 +00:00
committed by intellij-monorepo-bot
parent 5be896475f
commit 735a6e7874
2 changed files with 29 additions and 3 deletions
@@ -262,4 +262,19 @@ class C {
throw e;
}
}
static class F extends Exception {}
private void x() throws E, F {
throw new E2();
}
private void m16() throws F {
try {
x();
}
catch (F | E1 e) {
System.out.println(e);
<error descr="Unhandled exception: C.E1">throw e;</error>
}
catch (E ignored) {}
}
}