mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
inference: ensure to convert disjunction type to lub (IDEA-150364)
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
class Test {
|
||||
public static void main(String[] args) throws Exception {
|
||||
try {
|
||||
}
|
||||
catch (Exception | Error e) {
|
||||
<error descr="Unhandled exception: java.lang.Throwable">throw identity(identity(e));</error>
|
||||
}
|
||||
|
||||
try {
|
||||
}
|
||||
catch (Exception | Error e) {
|
||||
<error descr="Unhandled exception: java.lang.Throwable">throw identity(e);</error>
|
||||
}
|
||||
|
||||
try {
|
||||
}
|
||||
catch (Exception | Error e) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T identity(T throwable) {
|
||||
return throwable;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user