K2: add reproduction of KT-61100 and KT-59561
This commit is contained in:
committed by
Space Team
parent
7ab4ca6f51
commit
f085d0f660
+6
@@ -920,6 +920,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/twoActualTypealiasesToSameClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasWithArray.kt")
|
||||
public void testTypeAliasWithArray() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/typeAliasWithArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameters.kt")
|
||||
public void testTypeParameters() throws Exception {
|
||||
|
||||
+6
@@ -920,6 +920,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/twoActualTypealiasesToSameClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasWithArray.kt")
|
||||
public void testTypeAliasWithArray() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/typeAliasWithArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameters.kt")
|
||||
public void testTypeParameters() throws Exception {
|
||||
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// ISSUES: KT-61100, KT-59561
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
<!INCOMPATIBLE_MATCHING{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>expect enum class Mode {
|
||||
Throughput, AverageTime
|
||||
}<!>
|
||||
|
||||
<!INCOMPATIBLE_MATCHING{JVM}!>expect annotation class BenchmarkMode<!INCOMPATIBLE_MATCHING{JVM}!>(<!INCOMPATIBLE_MATCHING{JVM}!>vararg val value: Mode<!>)<!><!>
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS("actual typealias Mode = Mode; expect constructor(): Mode")!>Mode<!> = mypackage.Mode
|
||||
|
||||
|
||||
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS("actual typealias BenchmarkMode = BenchmarkMode; expect constructor(vararg value: Array<out Mode>): BenchmarkMode The following declaration is incompatible because parameter types are different: constructor(vararg value: Array<Mode>): BenchmarkMode")!>BenchmarkMode<!> = mypackage.BenchmarkMode
|
||||
|
||||
// FILE: mypackage/Mode.java
|
||||
|
||||
package mypackage;
|
||||
|
||||
public enum Mode {
|
||||
Throughput, AverageTime
|
||||
}
|
||||
|
||||
// FILE: mypackage/BenchmarkMode.java
|
||||
|
||||
package mypackage;
|
||||
|
||||
public @interface BenchmarkMode {
|
||||
|
||||
Mode[] value();
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
// ISSUES: KT-61100, KT-59561
|
||||
// WITH_STDLIB
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect enum class Mode {
|
||||
Throughput, AverageTime
|
||||
}
|
||||
|
||||
expect annotation class BenchmarkMode(vararg val value: Mode)
|
||||
|
||||
// MODULE: m1-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual typealias Mode = mypackage.Mode
|
||||
|
||||
|
||||
actual typealias <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>BenchmarkMode<!> = mypackage.BenchmarkMode
|
||||
|
||||
// FILE: mypackage/Mode.java
|
||||
|
||||
package mypackage;
|
||||
|
||||
public enum Mode {
|
||||
Throughput, AverageTime
|
||||
}
|
||||
|
||||
// FILE: mypackage/BenchmarkMode.java
|
||||
|
||||
package mypackage;
|
||||
|
||||
public @interface BenchmarkMode {
|
||||
|
||||
Mode[] value();
|
||||
}
|
||||
Generated
+6
@@ -24095,6 +24095,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/twoActualTypealiasesToSameClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeAliasWithArray.kt")
|
||||
public void testTypeAliasWithArray() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/annotationMatching/typeAliasWithArray.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("typeParameters.kt")
|
||||
public void testTypeParameters() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user