[FIR] KT-58523: Ensure the compiler resolves to the typealias
This commit is contained in:
committed by
Space Team
parent
1b9ed568bb
commit
99ff36c77a
+6
@@ -909,6 +909,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("resolutionToTypealiasInsteadOfProperty.kt")
|
||||||
|
public void testResolutionToTypealiasInsteadOfProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/resolutionToTypealiasInsteadOfProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ResolveOfJavaGenerics.kt")
|
@TestMetadata("ResolveOfJavaGenerics.kt")
|
||||||
public void testResolveOfJavaGenerics() throws Exception {
|
public void testResolveOfJavaGenerics() throws Exception {
|
||||||
|
|||||||
+6
@@ -909,6 +909,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("resolutionToTypealiasInsteadOfProperty.kt")
|
||||||
|
public void testResolutionToTypealiasInsteadOfProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/resolutionToTypealiasInsteadOfProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ResolveOfJavaGenerics.kt")
|
@TestMetadata("ResolveOfJavaGenerics.kt")
|
||||||
public void testResolveOfJavaGenerics() throws Exception {
|
public void testResolveOfJavaGenerics() throws Exception {
|
||||||
|
|||||||
+6
@@ -909,6 +909,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("resolutionToTypealiasInsteadOfProperty.kt")
|
||||||
|
public void testResolutionToTypealiasInsteadOfProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/resolutionToTypealiasInsteadOfProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ResolveOfJavaGenerics.kt")
|
@TestMetadata("ResolveOfJavaGenerics.kt")
|
||||||
public void testResolveOfJavaGenerics() throws Exception {
|
public void testResolveOfJavaGenerics() throws Exception {
|
||||||
|
|||||||
+6
@@ -909,6 +909,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("resolutionToTypealiasInsteadOfProperty.kt")
|
||||||
|
public void testResolutionToTypealiasInsteadOfProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/resolutionToTypealiasInsteadOfProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ResolveOfJavaGenerics.kt")
|
@TestMetadata("ResolveOfJavaGenerics.kt")
|
||||||
public void testResolveOfJavaGenerics() throws Exception {
|
public void testResolveOfJavaGenerics() throws Exception {
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// ISSUE: KT-58523
|
||||||
|
|
||||||
|
// FILE: pkg.kt
|
||||||
|
|
||||||
|
package pkg
|
||||||
|
|
||||||
|
class Klass
|
||||||
|
typealias ItemKey = Klass
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
import pkg.ItemKey
|
||||||
|
|
||||||
|
val ItemKey = 42
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
<!NO_COMPANION_OBJECT!>ItemKey<!> // K1: ok, K2: NO_COMPANION_OBJECT
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// ISSUE: KT-58523
|
||||||
|
|
||||||
|
// FILE: pkg.kt
|
||||||
|
|
||||||
|
package pkg
|
||||||
|
|
||||||
|
class Klass
|
||||||
|
typealias ItemKey = Klass
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
import pkg.ItemKey
|
||||||
|
|
||||||
|
val ItemKey = 42
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
ItemKey // K1: ok, K2: NO_COMPANION_OBJECT
|
||||||
|
}
|
||||||
Generated
+6
@@ -909,6 +909,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
runTest("compiler/testData/diagnostics/tests/ReserveYieldNoMore2.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("resolutionToTypealiasInsteadOfProperty.kt")
|
||||||
|
public void testResolutionToTypealiasInsteadOfProperty() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/resolutionToTypealiasInsteadOfProperty.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("ResolveOfJavaGenerics.kt")
|
@TestMetadata("ResolveOfJavaGenerics.kt")
|
||||||
public void testResolveOfJavaGenerics() throws Exception {
|
public void testResolveOfJavaGenerics() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user