Fix unsound smartcast from loop condition on assigned vars

^KT-22379 Fixed
This commit is contained in:
Dmitry Savvinov
2018-06-21 12:57:36 +03:00
committed by Dmitry Savvinov
parent a7d706f693
commit 447c127036
8 changed files with 85 additions and 2 deletions
@@ -19822,6 +19822,16 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
public void testWhileTrueWithBreakInIfCondition() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt");
}
@TestMetadata("whileWithAssertInConditionAndBreakAfter.kt")
public void testWhileWithAssertInConditionAndBreakAfter() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileWithAssertInConditionAndBreakAfter.kt");
}
@TestMetadata("whileWithAssertInConditionAndBreakBefore.kt")
public void testWhileWithAssertInConditionAndBreakBefore() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileWithAssertInConditionAndBreakBefore.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals")
@@ -19822,6 +19822,16 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
public void testWhileTrueWithBreakInIfCondition() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt");
}
@TestMetadata("whileWithAssertInConditionAndBreakAfter.kt")
public void testWhileWithAssertInConditionAndBreakAfter() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileWithAssertInConditionAndBreakAfter.kt");
}
@TestMetadata("whileWithAssertInConditionAndBreakBefore.kt")
public void testWhileWithAssertInConditionAndBreakBefore() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileWithAssertInConditionAndBreakBefore.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals")