complete nested calls for array set expression correctly
This commit is contained in:
@@ -313,7 +313,7 @@ public class CandidateResolver {
|
|||||||
if (callExpression == null) continue;
|
if (callExpression == null) continue;
|
||||||
|
|
||||||
CallCandidateResolutionContext<FunctionDescriptor> storedContextForArgument =
|
CallCandidateResolutionContext<FunctionDescriptor> storedContextForArgument =
|
||||||
context.resolutionResultsCache.getDeferredComputation(CallKey.create(context.call.getCallType(), callExpression));
|
context.resolutionResultsCache.getDeferredComputation(CallKey.create(Call.CallType.DEFAULT, callExpression));
|
||||||
if (storedContextForArgument == null) continue;
|
if (storedContextForArgument == null) continue;
|
||||||
|
|
||||||
CallCandidateResolutionContext<FunctionDescriptor> contextForArgument =
|
CallCandidateResolutionContext<FunctionDescriptor> contextForArgument =
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
fun foo<T>(t: T) = t
|
||||||
|
|
||||||
|
fun test(map: MutableMap<Int, Int>, t: Int) {
|
||||||
|
map [t] = foo(t) // t was marked with black square
|
||||||
|
}
|
||||||
|
|
||||||
|
//from library
|
||||||
|
fun <K, V> MutableMap<K, V>.set(key : K, value : V) : V<!BASE_WITH_NULLABLE_UPPER_BOUND!>?<!> = this.put(key, value)
|
||||||
@@ -2160,6 +2160,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("completeNestedCallsForArraySetExpression.kt")
|
||||||
|
public void testCompleteNestedCallsForArraySetExpression() throws Exception {
|
||||||
|
doTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsForArraySetExpression.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("completeNestedCallsInference.kt")
|
@TestMetadata("completeNestedCallsInference.kt")
|
||||||
public void testCompleteNestedCallsInference() throws Exception {
|
public void testCompleteNestedCallsInference() throws Exception {
|
||||||
doTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt");
|
doTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user