Files
Tagir Valeev 379a59d56b [java-highlighting] GenericsUtil.getLeastUpperBound: support PsiDisjunctionType
Fixes IDEA-320698 False positive error highlighting of an expression with an union type in a throw statement

GitOrigin-RevId: 7120053a75edbcb8717657b9791d1a310a581c32
2023-06-07 10:27:32 +00:00

14 lines
295 B
Java

class SomeClass {
static class Ex1 extends Exception {}
static class Ex2 extends Exception {}
native void run() throws Ex1, Ex2;
void test() throws Exception {
try {
run();
} catch (Ex1 | Ex2 e) {
throw e.getCause() != null ? new RuntimeException() : e;
}
}
}