Added test for correct package names resolve inside local classes

This commit is contained in:
Valentin Kipyatkov
2014-12-26 15:14:29 +03:00
parent b61b45f794
commit 18a536c846
3 changed files with 38 additions and 0 deletions
@@ -0,0 +1,17 @@
// FILE: A.kt
package foo.bar
class X
// FILE: B.kt
package foo
fun f() {
class Local1 {
fun g() : <!UNRESOLVED_REFERENCE!>bar<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>X<!>? = null
}
class Local2 {
fun g() : foo.bar.X? = null
}
}
@@ -0,0 +1,15 @@
package
package foo {
internal fun f(): kotlin.Unit
package foo.bar {
internal final class X {
public constructor X()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
}
@@ -286,6 +286,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("LocalClassAndShortSubpackageNames.kt")
public void testLocalClassAndShortSubpackageNames() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LocalClassAndShortSubpackageNames.kt");
doTest(fileName);
}
@TestMetadata("MergePackagesWithJava.kt")
public void testMergePackagesWithJava() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MergePackagesWithJava.kt");