Fix false "useless cast" when target type is flexible

#KT-17820 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-05-15 11:24:05 +03:00
parent a8f1e32dec
commit ac8fbce249
5 changed files with 50 additions and 4 deletions
@@ -2746,6 +2746,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("FlexibleTargetType.kt")
public void testFlexibleTargetType() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/FlexibleTargetType.kt");
doTest(fileName);
}
@TestMetadata("IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt")
public void testIsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt");