Prefer stable types to diagnose useless cast

#KT-11622 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-04-05 05:47:34 +03:00
parent 13eddba1f2
commit f518e8ebb8
7 changed files with 64 additions and 25 deletions
@@ -2956,6 +2956,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("StableTypeForUselessCast.kt")
public void testStableTypeForUselessCast() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt");
doTest(fileName);
}
@TestMetadata("WhenErasedDisallowFromAny.kt")
public void testWhenErasedDisallowFromAny() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/WhenErasedDisallowFromAny.kt");