KT-6118 Redundant type cast can be not redundant?

#KT-6118 Fixed
This commit is contained in:
Andrey Breslav
2015-02-16 14:38:34 +03:00
parent 47f772e75a
commit 54483dbb95
14 changed files with 178 additions and 2 deletions
@@ -2277,7 +2277,7 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
@TestMetadata("compiler/testData/diagnostics/tests/dataFlow")
@TestDataPath("$PROJECT_ROOT")
@InnerTestClasses({DataFlow.Local.class})
@InnerTestClasses({DataFlow.Assignment.class, DataFlow.Local.class})
@RunWith(JUnit3RunnerWithInners.class)
public static class DataFlow extends AbstractJetDiagnosticsTest {
public void testAllFilesPresentInDataFlow() throws Exception {
@@ -2308,6 +2308,45 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Assignment extends AbstractJetDiagnosticsTest {
public void testAllFilesPresentInAssignment() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/assignment"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("assignToNewVal.kt")
public void testAssignToNewVal() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/assignToNewVal.kt");
doTest(fileName);
}
@TestMetadata("kt6118.kt")
public void testKt6118() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/kt6118.kt");
doTest(fileName);
}
@TestMetadata("uninitializedValIsCheck.kt")
public void testUninitializedValIsCheck() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValIsCheck.kt");
doTest(fileName);
}
@TestMetadata("uninitializedValNullability.kt")
public void testUninitializedValNullability() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt");
doTest(fileName);
}
@TestMetadata("when.kt")
public void testWhen() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/when.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/dataFlow/local")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)