diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 2d1c1787691..c93a8a74826 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -7355,6 +7355,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("fakeOverridesForIntersectionTypes.kt") public void testFakeOverridesForIntersectionTypes() throws Exception { @@ -32725,6 +32731,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary2.kt") + public void testAnnotationsViaActualTypeAliasFromBinary2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt"); + } + @Test @TestMetadata("commonInternal.kt") public void testCommonInternal() throws Exception { @@ -32920,6 +32932,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java index b4babda4544..a7a018823aa 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/Fir2IrTextTestGenerated.java @@ -997,6 +997,12 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } + @Test + @TestMetadata("expectedEnumClass2.kt") + public void testExpectedEnumClass2() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt"); + } + @Test @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/LightTreeFir2IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/LightTreeFir2IrTextTestGenerated.java index 2afa7b9a8bf..ebb35a19a98 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/LightTreeFir2IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/LightTreeFir2IrTextTestGenerated.java @@ -997,6 +997,12 @@ public class LightTreeFir2IrTextTestGenerated extends AbstractLightTreeFir2IrTex runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } + @Test + @TestMetadata("expectedEnumClass2.kt") + public void testExpectedEnumClass2() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt"); + } + @Test @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt index ee499ee0a9a..5adc3015895 100644 --- a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt @@ -1,5 +1,8 @@ // IGNORE_BACKEND: NATIVE // !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE +// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). + // MODULE: lib // FILE: impl.kt class A(val result: String = "OK") diff --git a/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt new file mode 100644 index 00000000000..9403585698f --- /dev/null +++ b/compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt @@ -0,0 +1,20 @@ +// IGNORE_BACKEND: NATIVE +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY +// IGNORE_BACKEND_MULTI_MODULE: ANY + +// MODULE: lib1 +// FILE: impl.kt +class A(val result: String = "OK") + +// MODULE: lib2 +// FILE: B.kt +expect class B(result: String = "FAIL") + +// MODULE: main(lib1)()(lib2) +// FILE: multiplatform.kt +actual typealias B = A + +fun box(): String { + return B().result +} diff --git a/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt index 27fb9a98d80..e2d611d0761 100644 --- a/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt +++ b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt @@ -1,6 +1,8 @@ // TARGET_BACKEND: JVM // !LANGUAGE: +MultiPlatformProjects // WITH_REFLECT +// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE +// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). // MODULE: lib // FILE: Jnno.java diff --git a/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt new file mode 100644 index 00000000000..b3f7cdacffa --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt @@ -0,0 +1,99 @@ +// TARGET_BACKEND: JVM +// !LANGUAGE: +MultiPlatformProjects +// WITH_REFLECT +// IGNORE_BACKEND_K1: ANY + +// MODULE: lib1 +// FILE: Jnno.java + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface Jnno { + byte b() default 1; + char c() default 'x'; + double d() default 3.14; + float f() default -2.72f; + int i() default 42424242; + int i2() default 21212121 + 32323232; + long j() default 239239239239239L; + long j2() default 239239; + short s() default 42; + boolean z() default true; + byte[] ba() default {-1}; + char[] ca() default {'y'}; + double[] da() default {-3.14159}; + float[] fa() default {2.7218f}; + int[] ia() default {424242}; + long[] ja() default {239239239239L, 239239}; + short[] sa() default {-43}; + boolean[] za() default {false, true}; + String str() default "fi" + "zz"; + Class k() default Number.class; + // E e() default E.E1; + // TODO: A a() default @A("1"); + String[] stra() default {"bu", "zz"}; + Class[] ka() default {double.class, String.class, long[].class, Integer[][][].class, void.class}; + // E[] ea() default {E.E2, E.E3}; + // TODO: A[] aa() default {@A("2"), @A("3")}; +} + +// MODULE: lib2 +// FILE: Anno.kt + +// See compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias2.kt + +// This test checks the same behavior but against the Java implementation compiled to the .class file (as opposed to a .java source file). +// Enum annotation argument is commented below, because to be able to resolve E in Jnno.java we have to have a multi-module test where +// one of the modules also contains Java files, and that is too complicated for our test infrastructure at the moment. + +import kotlin.reflect.KClass + +expect annotation class Anno( + val b: Byte = 1.toByte(), + val c: Char = 'x', + val d: Double = 3.14, + val f: Float = -2.72f, + val i: Int = 42424242, + val i2: Int = 53535353, + val j: Long = 239239239239239L, + val j2: Long = 239239L, + val s: Short = 42.toShort(), + val z: Boolean = true, + val ba: ByteArray = [(-1).toByte()], + val ca: CharArray = ['y'], + val da: DoubleArray = [-3.14159], + val fa: FloatArray = [2.7218f], + val ia: IntArray = [424242], + val ja: LongArray = [239239239239L, 239239L], + val sa: ShortArray = [(-43).toShort()], + val za: BooleanArray = [false, true], + val str: String = "fizz", + val k: KClass<*> = Number::class, + // val e: E = E.E1, + // TODO: val a: A = A("1"), + val stra: Array = ["bu", "zz"], + val ka: Array> = [Double::class, String::class, LongArray::class, Array>>::class, Unit::class] + // val ea: Array = [E.E2, E.E3], + // TODO: val aa: Array = [A("2"), A("3")] +) + +// enum class E { E1, E2, E3 } + +annotation class A(val value: String) + +@Anno +fun test() {} + +// MODULE: main(lib1)()(lib2) +// FILE: main.kt + +actual typealias Anno = Jnno + +fun box(): String { + // We don't need to check the contents, just check that there are no anomalities in the bytecode by loading annotations + ::test.annotations.toString() + + return "OK" +} diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt index fc656ad5843..4bbd78ab601 100644 --- a/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt @@ -1,5 +1,8 @@ // !LANGUAGE: +MultiPlatformProjects // WITH_STDLIB +// IGNORE_BACKEND_K2: JVM_IR, JS_IR, NATIVE +// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). + // FILE: common.kt expect annotation class Foo(val z: String = "OK") diff --git a/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt new file mode 100644 index 00000000000..65c68ab7cc1 --- /dev/null +++ b/compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt @@ -0,0 +1,23 @@ +// !LANGUAGE: +MultiPlatformProjects +// WITH_STDLIB +// IGNORE_BACKEND_K1: ANY +// IGNORE_BACKEND_K2: JS_IR, NATIVE + +// MODULE: common +// FILE: common.kt +expect annotation class Foo(val z: String = "OK") + +// MODULE: main()()(common) +// FILE: main.kt +actual typealias Foo = Foo2 + +annotation class Foo2 (val z: String = "OK") + +@Foo +fun test() {} + +fun box(): String { + test() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt index d5453638655..052f5f9ca25 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt @@ -1,4 +1,6 @@ // !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K2: ANY +// FIR status: In FIR, declaring the same `expect` and `actual` classes in one compiler module is not possible (see KT-55177). expect enum class MyEnum { FOO, diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.ir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt similarity index 52% rename from compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.ir.txt rename to compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt index cea9a63c63d..f013067784c 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt @@ -1,60 +1,4 @@ -FILE fqName: fileName:/expectedEnumClass.kt - CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public [expect] superTypes:[kotlin.Enum<.MyEnum>] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum - CONSTRUCTOR visibility:private <> () returnType:.MyEnum [primary,expect] - ENUM_ENTRY name:FOO - init: EXPRESSION_BODY - ENUM_CONSTRUCTOR_CALL 'private constructor () [primary,expect] declared in .MyEnum' - ENUM_ENTRY name:BAR - init: EXPRESSION_BODY - ENUM_CONSTRUCTOR_CALL 'private constructor () [primary,expect] declared in .MyEnum' - FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.MyEnum> [expect] - FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.MyEnum [expect] - VALUE_PARAMETER name:value index:0 type:kotlin.String - PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [expect,val] - FUN ENUM_CLASS_SPECIAL_MEMBER name: visibility:public modality:FINAL <> () returnType:kotlin.enums.EnumEntries - correspondingProperty: PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [expect,val] - SYNTHETIC_BODY kind=ENUM_ENTRIES - FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any [expect,fake_override] - overridden: - protected final fun clone (): kotlin.Any declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:compareTo visibility:public modality:FINAL <> ($this:kotlin.Enum, other:.MyEnum) returnType:kotlin.Int [expect,fake_override,operator] - overridden: - public final fun compareTo (other: E of kotlin.Enum): kotlin.Int [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:.MyEnum - FUN FAKE_OVERRIDE name:equals visibility:public modality:FINAL <> ($this:kotlin.Enum, other:kotlin.Any?) returnType:kotlin.Boolean [expect,fake_override,operator] - overridden: - public final fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [expect,fake_override] - overridden: - public final fun hashCode (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Enum) returnType:kotlin.String [expect,fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [expect,fake_override,val] - annotations: - IntrinsicConstEvaluation - overridden: - public final name: kotlin.String [val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.String [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:name visibility:public modality:FINAL [expect,fake_override,val] - overridden: - public final fun (): kotlin.String declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum - PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [expect,fake_override,val] - overridden: - public final ordinal: kotlin.Int [val] - FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:ordinal visibility:public modality:FINAL [expect,fake_override,val] - overridden: - public final fun (): kotlin.Int declared in kotlin.Enum - $this: VALUE_PARAMETER name: type:kotlin.Enum +FILE fqName: fileName:/main.kt CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.MyEnum>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.MyEnum CONSTRUCTOR visibility:private <> () returnType:.MyEnum [primary] diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt new file mode 100644 index 00000000000..02417b3cb6a --- /dev/null +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt @@ -0,0 +1,18 @@ +// FIR_IDENTICAL +// !LANGUAGE: +MultiPlatformProjects +// IGNORE_BACKEND_K1: ANY + +// MODULE: lib +// FILE: lib.kt +expect enum class MyEnum { + FOO, + BAR +} + +// MODULE: main()()(lib) +// FILE: main.kt +actual enum class MyEnum { + FOO, + BAR, + BAZ +} \ No newline at end of file diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.kt.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt.txt similarity index 57% rename from compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.kt.txt rename to compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt.txt index e87ec63b13d..08fa8fe162d 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt.txt @@ -1,15 +1,4 @@ -expect enum class MyEnum : Enum { - private expect constructor() /* primary */ - FOO = MyEnum() - - BAR = MyEnum() - - expect fun values(): Array - expect fun valueOf(value: String): MyEnum - expect val entries: EnumEntries - get(): EnumEntries /* Synthetic body for ENUM_ENTRIES */ - -} +// FILE: main.kt enum class MyEnum : Enum { private constructor() /* primary */ { @@ -32,4 +21,3 @@ enum class MyEnum : Enum { get(): EnumEntries /* Synthetic body for ENUM_ENTRIES */ } - diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index 76b24ae786e..3bff0a8a5d1 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -7199,6 +7199,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("fakeOverridesForIntersectionTypes.kt") public void testFakeOverridesForIntersectionTypes() throws Exception { @@ -31465,6 +31471,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary2.kt") + public void testAnnotationsViaActualTypeAliasFromBinary2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt"); + } + @Test @TestMetadata("commonInternal.kt") public void testCommonInternal() throws Exception { @@ -31660,6 +31672,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 87a0e291b73..f0f874ca29b 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -7355,6 +7355,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("fakeOverridesForIntersectionTypes.kt") public void testFakeOverridesForIntersectionTypes() throws Exception { @@ -32725,6 +32731,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); } + @Test + @TestMetadata("annotationsViaActualTypeAliasFromBinary2.kt") + public void testAnnotationsViaActualTypeAliasFromBinary2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt"); + } + @Test @TestMetadata("commonInternal.kt") public void testCommonInternal() throws Exception { @@ -32920,6 +32932,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java index 77e4f9d0662..1dac9253df6 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxTestGenerated.java @@ -157,6 +157,12 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("fakeOverridesForIntersectionTypes.kt") public void testFakeOverridesForIntersectionTypes() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java index 27988159bae..89ccbd7f8a4 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxTestGenerated.java @@ -157,6 +157,12 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("fakeOverridesForIntersectionTypes.kt") public void testFakeOverridesForIntersectionTypes() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java index 06bd5ca5896..2cc0545e526 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java @@ -997,6 +997,12 @@ public class IrTextTestGenerated extends AbstractIrTextTest { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } + @Test + @TestMetadata("expectedEnumClass2.kt") + public void testExpectedEnumClass2() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt"); + } + @Test @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt index e54407a4fc0..b2e6e38556d 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt @@ -104,6 +104,15 @@ open class AbstractIrTextTest : AbstractIrTextTestBase> get() = ::ClassicFrontend2IrConverter + + override fun configure(builder: TestConfigurationBuilder) { + super.configure(builder) + with(builder) { + useAfterAnalysisCheckers( + ::BlackBoxCodegenSuppressor, + ) + } + } } open class AbstractFir2IrTextTest : AbstractIrTextTestBase() { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 8bbb6063dd3..36249d6d8c9 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -26778,6 +26778,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary.kt"); } + @TestMetadata("annotationsViaActualTypeAliasFromBinary2.kt") + public void testAnnotationsViaActualTypeAliasFromBinary2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/annotationsViaActualTypeAliasFromBinary2.kt"); + } + @TestMetadata("commonInternal.kt") public void testCommonInternal() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/commonInternal.kt"); @@ -26945,6 +26950,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/withTypeParameter.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java index 652f7594997..125832d5d03 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java @@ -727,6 +727,11 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } + @TestMetadata("expectedEnumClass2.kt") + public void testExpectedEnumClass2() throws Exception { + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.kt"); + } + @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 6b4d94ca0b7..eccb44c2a07 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -22944,6 +22944,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index 66dd286296f..f5d2238451b 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -22962,6 +22962,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 35842b310b2..e339d1bb7f5 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -22962,6 +22962,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index d6679226f5a..c82be9918c2 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -22962,6 +22962,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index bd7ec6066b6..8a93f356ad6 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -20543,6 +20543,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/withTypeParameter.kt"); diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java index 2f0db431a91..68a4209d41e 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/K2NativeCodegenBoxTestGenerated.java @@ -5653,6 +5653,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("genericSetter.kt") public void testGenericSetter() throws Exception { @@ -26068,6 +26074,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index 1c667a0c183..db888676f2d 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -5593,6 +5593,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias.kt"); } + @Test + @TestMetadata("expectClassActualTypeAlias2.kt") + public void testExpectClassActualTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/compileKotlinAgainstKotlin/expectClassActualTypeAlias2.kt"); + } + @Test @TestMetadata("genericSetter.kt") public void testGenericSetter() throws Exception { @@ -25771,6 +25777,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias.kt"); } + @Test + @TestMetadata("typeAlias2.kt") + public void testTypeAlias2() throws Exception { + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/typeAlias2.kt"); + } + @Test @TestMetadata("withTypeParameter.kt") public void testWithTypeParameter() throws Exception {