mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inference: force incorporation after reduce
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ public class FunctionalInterfaceParameterizationUtil {
|
||||
session.substituteWithInferenceVariables(targetMethodParams[i].getType())));
|
||||
}
|
||||
|
||||
if (!session.repeatInferencePhases(false)) {
|
||||
if (!session.repeatInferencePhases(true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ public class MethodReferenceResolver implements ResolveCache.PolyVariantContextR
|
||||
return psiSubstitutor;
|
||||
}
|
||||
|
||||
if (!session.repeatInferencePhases(false)) {
|
||||
if (!session.repeatInferencePhases(true)) {
|
||||
return substitutor;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -29,9 +29,9 @@ class Test {
|
||||
static void meth4(I3 s) { }
|
||||
|
||||
static {
|
||||
meth1(Foo::<error descr="Invalid constructor reference: String cannot be converted to X">new</error>);
|
||||
meth1(Foo::<error descr="Invalid constructor reference: String cannot be converted to Number">new</error>);
|
||||
meth2(Foo::new);
|
||||
meth3(Foo::<error descr="Invalid constructor reference: Object cannot be converted to X">new</error>);
|
||||
meth3(Foo::<error descr="Invalid constructor reference: Object cannot be converted to Number">new</error>);
|
||||
meth4<error descr="Ambiguous method call: both 'Test.meth4(I1)' and 'Test.meth4(I2)' match">(Foo::new)</error>;
|
||||
|
||||
meth1(Test::<error descr="Invalid method reference: String cannot be converted to X">foo</error>);
|
||||
|
||||
Reference in New Issue
Block a user