improved reporting TYPE_MISMATCH error for function literals

(introduced EXPECTED_PARAMETER_TYPE_MISMATCH, EXPECTED_RETURN_TYPE_MISMATCH, EXPECTED_PARAMETERS_NUMBER_MISMATCH
instead of reporting TYPE_MISMATCH on the whole function literal)
This commit is contained in:
Svetlana Isakova
2012-12-20 18:50:32 +04:00
parent 972b234db6
commit c37d7352a5
11 changed files with 172 additions and 41 deletions
@@ -1791,6 +1791,16 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("compiler/testData/diagnostics/tests/functionLiterals"), "kt", true);
}
@TestMetadata("ExpectedParameterTypeMismatchVariance.kt")
public void testExpectedParameterTypeMismatchVariance() throws Exception {
doTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt");
}
@TestMetadata("ExpectedParametersTypesMismatch.kt")
public void testExpectedParametersTypesMismatch() throws Exception {
doTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt");
}
@TestMetadata("kt2906.kt")
public void testKt2906() throws Exception {
doTest("compiler/testData/diagnostics/tests/functionLiterals/kt2906.kt");