mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
testdata: ensure overload resolution by return type should not take place for interrupted control flow
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
|
||||
interface I1 {String m();}
|
||||
interface I2 {void m();}
|
||||
|
||||
void call(I1 p) { }
|
||||
void call(I2 p) { }
|
||||
|
||||
void test() {
|
||||
call<error descr="Ambiguous method call: both 'Test.call(I1)' and 'Test.call(I2)' match">(() -> { throw new RuntimeException(); })</error>;
|
||||
call(() -> { if (true) return ""; throw new RuntimeException(); });
|
||||
call(() -> { if (true) return; throw new RuntimeException(); });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user