Tests for bug in CFA: no return in when() is now detected
This commit is contained in:
@@ -166,6 +166,11 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
doTest("compiler/testData/cfg/ReturnFromExpression.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("returnsInWhen.kt")
|
||||
public void testReturnsInWhen() throws Exception {
|
||||
doTest("compiler/testData/cfg/returnsInWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ShortFunction.kt")
|
||||
public void testShortFunction() throws Exception {
|
||||
doTest("compiler/testData/cfg/ShortFunction.kt");
|
||||
|
||||
@@ -1407,6 +1407,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/DeadCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("definiteReturnInWhen.kt")
|
||||
public void testDefiniteReturnInWhen() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturnInWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt1001.kt")
|
||||
public void testKt1001() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt");
|
||||
|
||||
Reference in New Issue
Block a user