Check function arguments of nested unsuccessful calls.

This commit is contained in:
svtk
2013-11-21 19:10:23 +04:00
parent 1a34dffb1f
commit 058726a0f1
3 changed files with 14 additions and 0 deletions
@@ -400,6 +400,7 @@ public class CandidateResolver {
context.resolutionResultsCache.getDeferredComputation(keyExpression);
if (storedContextForArgument != null) {
completeNestedCallsForNotResolvedInvocation(storedContextForArgument);
argumentTypeResolver.checkTypesForFunctionArgumentsWithNoCallee(storedContextForArgument.replaceBindingTrace(context.trace));
}
}
}
@@ -0,0 +1,8 @@
package c
fun demo() {
val bar = 51
fun map(f : <!SYNTAX!><!SYNTAX!><!>fun<!>
val foo = 3;
bar <!NONE_APPLICABLE!>+<!> map { foo }
}
@@ -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");