[FE 1.0] Prohibit using non exhaustive if and when in rhs of elvis expression

^KT-44705
^KT-49349 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-10-21 12:49:36 +03:00
committed by teamcityserver
parent 06a26a5a74
commit a2b8493f47
16 changed files with 192 additions and 9 deletions
@@ -6289,6 +6289,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/controlStructures/nestedLoopsWithMultipleLabels.kt");
}
@Test
@TestMetadata("nonExhaustiveIfInElvis_after.kt")
public void testNonExhaustiveIfInElvis_after() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/nonExhaustiveIfInElvis_after.kt");
}
@Test
@TestMetadata("nonExhaustiveIfInElvis_before.kt")
public void testNonExhaustiveIfInElvis_before() throws Exception {
runTest("compiler/testData/diagnostics/tests/controlStructures/nonExhaustiveIfInElvis_before.kt");
}
@Test
@TestMetadata("notAFunctionLabel_after.kt")
public void testNotAFunctionLabel_after() throws Exception {