Fixed bug: resolution task wasn't recreated
The old resolved calls were used
This commit is contained in:
@@ -564,7 +564,8 @@ public class CallResolver {
|
||||
};
|
||||
TemporaryBindingTrace temporaryTrace =
|
||||
TemporaryBindingTrace.create(task.trace, "trace for resolution guarded for extra function literal arguments");
|
||||
ResolutionTask<D, F> newTask = task.replaceBindingTrace(temporaryTrace).replaceCall(callWithoutFLArgs);
|
||||
ResolutionTask<D, F> newTask = new ResolutionTask<D, F>(task.getCandidates(), task.toBasic(), task.tracing).
|
||||
replaceBindingTrace(temporaryTrace).replaceCall(callWithoutFLArgs);
|
||||
|
||||
OverloadResolutionResultsImpl<F> resultsWithFunctionLiteralsStripped = performResolution(newTask, callTransformer);
|
||||
if (resultsWithFunctionLiteralsStripped.isSuccess() || resultsWithFunctionLiteralsStripped.isAmbiguity()) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package p
|
||||
|
||||
class X<V>(provider: () -> V, trackValue: Boolean) {
|
||||
}
|
||||
|
||||
class B {
|
||||
val c = <!NO_VALUE_FOR_PARAMETER!>X<!><String> <!TYPE_MISMATCH!>{
|
||||
"e"
|
||||
}<!>
|
||||
}
|
||||
@@ -6131,6 +6131,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/diagnostics/tests/resolve"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("incompleteConstructorInvocation.kt")
|
||||
public void testIncompleteConstructorInvocation() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/resolve/incompleteConstructorInvocation.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("resolveWithFunctionLiteralWithId.kt")
|
||||
public void testResolveWithFunctionLiteralWithId() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralWithId.kt");
|
||||
|
||||
Reference in New Issue
Block a user