[FIR] KT-58460: Ensure the error is missing

This commit is contained in:
Nikolay Lunyak
2023-05-25 10:41:35 +03:00
committed by Space Team
parent 06ac8a10cd
commit ff61f70dd0
7 changed files with 40 additions and 0 deletions
@@ -333,6 +333,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt");
}
@Test
@TestMetadata("funReturnsAny.kt")
public void testFunReturnsAny() throws Exception {
runTest("compiler/testData/diagnostics/tests/funReturnsAny.kt");
}
@Test
@TestMetadata("FunctionCalleeExpressions.kt")
public void testFunctionCalleeExpressions() throws Exception {
@@ -333,6 +333,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt");
}
@Test
@TestMetadata("funReturnsAny.kt")
public void testFunReturnsAny() throws Exception {
runTest("compiler/testData/diagnostics/tests/funReturnsAny.kt");
}
@Test
@TestMetadata("FunctionCalleeExpressions.kt")
public void testFunctionCalleeExpressions() throws Exception {
@@ -333,6 +333,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt");
}
@Test
@TestMetadata("funReturnsAny.kt")
public void testFunReturnsAny() throws Exception {
runTest("compiler/testData/diagnostics/tests/funReturnsAny.kt");
}
@Test
@TestMetadata("FunctionCalleeExpressions.kt")
public void testFunctionCalleeExpressions() throws Exception {
@@ -333,6 +333,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt");
}
@Test
@TestMetadata("funReturnsAny.kt")
public void testFunReturnsAny() throws Exception {
runTest("compiler/testData/diagnostics/tests/funReturnsAny.kt");
}
@Test
@TestMetadata("FunctionCalleeExpressions.kt")
public void testFunctionCalleeExpressions() throws Exception {
@@ -0,0 +1,5 @@
// ISSUE: KT-58460
fun someFunction() : Any {
return
}
+5
View File
@@ -0,0 +1,5 @@
// ISSUE: KT-58460
fun someFunction() : Any {
<!RETURN_TYPE_MISMATCH!>return<!>
}
@@ -333,6 +333,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt");
}
@Test
@TestMetadata("funReturnsAny.kt")
public void testFunReturnsAny() throws Exception {
runTest("compiler/testData/diagnostics/tests/funReturnsAny.kt");
}
@Test
@TestMetadata("FunctionCalleeExpressions.kt")
public void testFunctionCalleeExpressions() throws Exception {