Respect receiver-dependent visibility when selecting smart-cast type

This commit is contained in:
Denis Zharkov
2016-03-25 13:59:52 +03:00
parent d3b7eb81fa
commit 5bf336474d
16 changed files with 302 additions and 21 deletions
@@ -15476,6 +15476,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("innerProtectedClass.kt")
public void testInnerProtectedClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.kt");
doTest(fileName);
}
@TestMetadata("javaInheritedInKotlin.kt")
public void testJavaInheritedInKotlin() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.kt");
@@ -15493,6 +15499,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.kt");
doTest(fileName);
}
@TestMetadata("smartcastOnExtensionReceiver.kt")
public void testSmartcastOnExtensionReceiver() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/smartcastOnExtensionReceiver.kt");
doTest(fileName);
}
@TestMetadata("unstableSmartCast.kt")
public void testUnstableSmartCast() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt");
doTest(fileName);
}
@TestMetadata("withSmartcast.kt")
public void testWithSmartcast() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/withSmartcast.kt");
doTest(fileName);
}
}
}