mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
new overload resolution: reject explicitly typed lambda to be pertinent to applicability if any of its return expressions is not
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
abstract class PertinentToApplicabilityOfExplicitlyTypedLambdaTest {
|
||||
|
||||
interface A {
|
||||
B m(int a);
|
||||
}
|
||||
|
||||
interface B {
|
||||
int m(int b);
|
||||
}
|
||||
|
||||
abstract void foo(A a);
|
||||
abstract void foo(B b);
|
||||
|
||||
{
|
||||
foo<error descr="Ambiguous method call: both 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(A)' and 'PertinentToApplicabilityOfExplicitlyTypedLambdaTest.foo(B)' match">(x -> y -> 42)</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user