mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
new inference: overload resolution: check SAM specific withing common specific check
(cherry picked from commit 2bbd45e57bc5df7ff2a5cae7acedc0d2428d9afe)
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
class Test {
|
||||
interface IInt {
|
||||
int _();
|
||||
}
|
||||
|
||||
interface ILong {
|
||||
long _();
|
||||
}
|
||||
|
||||
void m(IInt i, Long l) {}
|
||||
void m(ILong l, Integer i) {}
|
||||
|
||||
void m1(IInt i, Integer l) {}
|
||||
void m1(ILong l, Object i) {}
|
||||
|
||||
void test() {
|
||||
m<error descr="Ambiguous method call: both 'Test.m(IInt, Long)' and 'Test.m(ILong, Integer)' match">(() -> 1, null)</error>;
|
||||
m1(() -> 1, null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user