FIR checker: report SMARTCAST_IMPOSSIBLE for local variables

This commit is contained in:
Tianyu Geng
2021-05-13 17:23:18 -07:00
committed by TeamCityServer
parent 092750e215
commit 0ecc752813
38 changed files with 792 additions and 99 deletions
@@ -27510,6 +27510,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt");
}
@Test
@TestMetadata("capturedByAtLeastOnce.kt")
public void testCapturedByAtLeastOnce() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt");
}
@Test
@TestMetadata("capturedByMultipleLambdas.kt")
public void testCapturedByMultipleLambdas() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt");
}
@Test
@TestMetadata("doWhileWithMiddleBreak.kt")
public void testDoWhileWithMiddleBreak() throws Exception {
@@ -35721,6 +35733,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt");
}
@Test
@TestMetadata("lambdaInCallArgs.kt")
public void testLambdaInCallArgs() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lambdaInCallArgs.kt");
}
@Test
@TestMetadata("lazyDeclaresAndModifies.kt")
public void testLazyDeclaresAndModifies() throws Exception {
@@ -27510,6 +27510,18 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt");
}
@Test
@TestMetadata("capturedByAtLeastOnce.kt")
public void testCapturedByAtLeastOnce() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt");
}
@Test
@TestMetadata("capturedByMultipleLambdas.kt")
public void testCapturedByMultipleLambdas() throws Exception {
runTest("compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt");
}
@Test
@TestMetadata("doWhileWithMiddleBreak.kt")
public void testDoWhileWithMiddleBreak() throws Exception {
@@ -35721,6 +35733,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt");
}
@Test
@TestMetadata("lambdaInCallArgs.kt")
public void testLambdaInCallArgs() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lambdaInCallArgs.kt");
}
@Test
@TestMetadata("lazyDeclaresAndModifies.kt")
public void testLazyDeclaresAndModifies() throws Exception {