Tests for importing type aliases
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
// FILE: file1.kt
|
||||||
|
package package1
|
||||||
|
|
||||||
|
typealias S = String
|
||||||
|
|
||||||
|
// FILE: file2.kt
|
||||||
|
package package2
|
||||||
|
|
||||||
|
typealias I = Int
|
||||||
|
|
||||||
|
class Outer {
|
||||||
|
typealias A = Any
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: test.kt
|
||||||
|
package package3
|
||||||
|
|
||||||
|
import package1.*
|
||||||
|
import package2.I
|
||||||
|
import package2.Outer.A
|
||||||
|
|
||||||
|
val testS: S = ""
|
||||||
|
val testI: I = 42
|
||||||
|
val testA: A = Any()
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
package package1 {
|
||||||
|
public typealias S = kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
package package2 {
|
||||||
|
public typealias I = kotlin.Int
|
||||||
|
|
||||||
|
public final class Outer {
|
||||||
|
public typealias A = kotlin.Any
|
||||||
|
public constructor Outer()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
package package3 {
|
||||||
|
public val testA: package2.Outer.A [= kotlin.Any]
|
||||||
|
public val testI: package2.I [= kotlin.Int] = 42
|
||||||
|
public val testS: package1.S [= kotlin.String] = ""
|
||||||
|
}
|
||||||
@@ -19398,6 +19398,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("import.kt")
|
||||||
|
public void testImport() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/import.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inSupertypesList.kt")
|
@TestMetadata("inSupertypesList.kt")
|
||||||
public void testInSupertypesList() throws Exception {
|
public void testInSupertypesList() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user