inference: force incorporation after reduce

This commit is contained in:
Anna Kozlova
2016-01-19 20:46:08 +01:00
parent 4c7b39f460
commit 0d1cca1cd1
3 changed files with 4 additions and 4 deletions
@@ -105,7 +105,7 @@ public class FunctionalInterfaceParameterizationUtil {
session.substituteWithInferenceVariables(targetMethodParams[i].getType())));
}
if (!session.repeatInferencePhases(false)) {
if (!session.repeatInferencePhases(true)) {
return null;
}
@@ -121,7 +121,7 @@ public class MethodReferenceResolver implements ResolveCache.PolyVariantContextR
return psiSubstitutor;
}
if (!session.repeatInferencePhases(false)) {
if (!session.repeatInferencePhases(true)) {
return substitutor;
}
@@ -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>);