[FIR] Fix local RETURN_TYPE_MISMATCH with flexible Unit and multiple Unit returns

This commit is contained in:
Ivan Kochurkin
2023-09-20 15:02:46 +02:00
committed by Space Team
parent 4b9e15dfa8
commit b5acd1da6a
8 changed files with 97 additions and 3 deletions
@@ -13433,6 +13433,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt");
}
@Test
@TestMetadata("LocalReturnWithFlexibleUnitType.kt")
public void testLocalReturnWithFlexibleUnitType() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithFlexibleUnitType.kt");
}
@Test
@TestMetadata("LocalReturnsWithExplicitReturnType.kt")
public void testLocalReturnsWithExplicitReturnType() throws Exception {
@@ -13445,6 +13451,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt");
}
@Test
@TestMetadata("MultipleLocalUnitReturns.kt")
public void testMultipleLocalUnitReturns() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MultipleLocalUnitReturns.kt");
}
@Test
@TestMetadata("NoCommonSystem.kt")
public void testNoCommonSystem() throws Exception {
@@ -13433,6 +13433,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt");
}
@Test
@TestMetadata("LocalReturnWithFlexibleUnitType.kt")
public void testLocalReturnWithFlexibleUnitType() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithFlexibleUnitType.kt");
}
@Test
@TestMetadata("LocalReturnsWithExplicitReturnType.kt")
public void testLocalReturnsWithExplicitReturnType() throws Exception {
@@ -13445,6 +13451,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt");
}
@Test
@TestMetadata("MultipleLocalUnitReturns.kt")
public void testMultipleLocalUnitReturns() throws Exception {
runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MultipleLocalUnitReturns.kt");
}
@Test
@TestMetadata("NoCommonSystem.kt")
public void testNoCommonSystem() throws Exception {