diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java index af700113278..6063946a7a3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/calls/CandidateResolver.java @@ -400,6 +400,7 @@ public class CandidateResolver { context.resolutionResultsCache.getDeferredComputation(keyExpression); if (storedContextForArgument != null) { completeNestedCallsForNotResolvedInvocation(storedContextForArgument); + argumentTypeResolver.checkTypesForFunctionArgumentsWithNoCallee(storedContextForArgument.replaceBindingTrace(context.trace)); } } } diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt new file mode 100644 index 00000000000..b4a2738c553 --- /dev/null +++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt @@ -0,0 +1,8 @@ +package c + +fun demo() { + val bar = 51 + fun map(f : fun + val foo = 3; + bar + map { foo } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 05cac256d92..5d6cb3ddf5b 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -3104,6 +3104,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt"); } + @TestMetadata("completeFunctionArgumentsOfNestedCalls.kt") + public void testCompleteFunctionArgumentsOfNestedCalls() throws Exception { + doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt"); + } + @TestMetadata("funEquals.kt") public void testFunEquals() throws Exception { doTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funEquals.kt");