diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index c618f73af36..4752aa26afe 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirLightTreeBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated e } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 1f41d4c4b76..74758e51b6d 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirLightTreeBlackBoxInlineCodegenWithIrInlinerTestGenerated extends } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 2b7626f703b..5ffad8877b3 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index c2a3267ca98..568b65c58e2 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirPsiBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 6aa4be23a2e..55f4be42981 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirPsiBlackBoxInlineCodegenWithIrInlinerTestGenerated extends Abstr } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index cdd071e22fc..cd78ddb2450 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -5849,6 +5849,52 @@ public class FirPsiSerializeCompileKotlinAgainstInlineKotlinTestGenerated extend } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt b/compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt new file mode 100644 index 00000000000..318891cc475 --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt @@ -0,0 +1,29 @@ +// FILE: 1.kt +interface I { + fun get(): TTTT + fun set(x: TTTT) + +} +interface J +class X(val result: String) : J +class Box(val x : T) { + inline fun getI(crossinline block : () -> Unit) : I { + val temp = x + return object : I { + var t = temp + override fun get() = t + override fun set(y: T) { + block() + t = y + } + } + } +} + +fun Box<*>.getIExt() = getI() {} + +// FILE: 2.kt +fun box(): String { + val xObject = Box(X("OK")).getIExt().get() as X + return xObject.result +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/typeParameters/basic.kt b/compiler/testData/codegen/boxInline/typeParameters/basic.kt new file mode 100644 index 00000000000..3fc813947bd --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/basic.kt @@ -0,0 +1,16 @@ +// FILE: 1.kt + +class Box(val value: T) { + inline fun run(block: (T) -> Unit) { + block(value) + } +} + +// FILE: 2.kt +fun box(): String { + Box("OK").run { outer -> + return outer + } + + return "Fail" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt b/compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt new file mode 100644 index 00000000000..c8bc3697399 --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt @@ -0,0 +1,31 @@ +// FILE: 1.kt +class Box( + private var t: T +) { + fun set(t: T): T { + this.t = t + return t + } + fun get(): T = t +} + +inline fun Box.act(): U { + val u = get() + return set(u) +} + +fun foo(uuu: Box<*>): Any? { + val x = uuu.act() + return x +} + +// This code is not compilable +// fun fooInlined(uuu: Box<*>) { +// val u = get() +// return set(u) +// } + +// FILE: 2.kt +fun box(): String { + return foo(Box("OK")).toString() +} diff --git a/compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt b/compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt new file mode 100644 index 00000000000..de53aec2281 --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt @@ -0,0 +1,25 @@ +// FILE: 1.kt +interface I { + fun f(): String +} + +interface J { + fun f2(): String +} + +class X : I, J { + override fun f(): String = "O" + override fun f2(): String = "K" +} + +class Box(val x: T) where T: Any, T : I, T: J { + inline fun f(): String { + val a = x + return a.f() + a.f2() + } +} + +// FILE: 2.kt +fun box(): String { + return Box(X()).f() +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt b/compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt new file mode 100644 index 00000000000..c614ccf077a --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt @@ -0,0 +1,25 @@ +// FILE: 1.kt +open class Box( + private var t: T +) { + fun set(t: T): T { + this.t = t + return t + } + fun get(): T = t + inline fun act(): T { + val u = get() + return set(u) + } +} +class StringBox(t: String) : Box(t) + +fun foo(uuu: StringBox): String { + val x = uuu.act() + return x +} + +// FILE: 2.kt +fun box(): String { + return foo(StringBox("OK")) +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt new file mode 100644 index 00000000000..adc37a32ddb --- /dev/null +++ b/compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt @@ -0,0 +1,16 @@ +// IGNORE_INLINER: IR +// IGNORE_BACKEND: WASM + +// FILE: 1.kt +inline fun unchecked(any: Any): Any { + @Suppress("UNCHECKED_CAST") + val u: U = any as U + return u as Any +} + +// FILE: 2.kt +fun box(): String { + // in current inline implementation everyting works fine + // but if we will reify all type parameters, then this example will fail on runtime + return unchecked("OK").toString() +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java index 2966aab548d..596b17ee6bf 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -5771,6 +5771,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 60a208d3b24..14c68ba610f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -5771,6 +5771,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java index df2eac0c4b1..3e03d9f6b38 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class IrBlackBoxInlineCodegenWithBytecodeInlinerTestGenerated extends Abs } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java index 5ffa234f4e9..eab8c60658c 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxInlineCodegenWithIrInlinerTestGenerated.java @@ -5849,6 +5849,52 @@ public class IrBlackBoxInlineCodegenWithIrInlinerTestGenerated extends AbstractI } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index 357e19134db..84fbfb32472 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -5849,6 +5849,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java index 99908e25d84..6f387e906bb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -5849,6 +5849,52 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java index fd5adf65c07..c89284a9465 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmIrAgainstOldBoxInlineTestGenerated.java @@ -5849,6 +5849,52 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_IR_AGAINST_OLD, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java index 39b96a6271b..d3cd97cf8a0 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/JvmOldAgainstIrBoxInlineTestGenerated.java @@ -5771,6 +5771,52 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_MULTI_MODULE_OLD_AGAINST_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java index 342ffffaafe..722de2c9145 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenInlineTestGenerated.java @@ -5093,6 +5093,52 @@ public class FirJsCodegenInlineTestGenerated extends AbstractFirJsCodegenInlineT } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java index 95aacb2df03..9df739fbe15 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenInlineTestGenerated.java @@ -5093,6 +5093,52 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java index 6e7b0d8b688..498b428e93e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenInlineTestGenerated.java @@ -5093,6 +5093,52 @@ public class IrJsES6CodegenInlineTestGenerated extends AbstractIrJsES6CodegenInl } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 36d70b5ea20..e087ceba3e7 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -46164,6 +46164,55 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 2c8770c6b5a..77371eca0f6 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -47378,6 +47378,57 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") 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 6991e19e088..442aef508ca 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 @@ -45558,6 +45558,54 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + @DisabledTestsIfProperty(sourceLocations = { "compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt", "compiler/testData/codegen/box/multiplatform/defaultArguments/*.kt", "compiler/testData/codegen/box/multiplatform/migratedOldTests/*.kt", "compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt" }, property = ClassLevelProperty.TEST_MODE, propertyValue = "ONE_STAGE_MULTI_MODULE") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 1b78fed083e..0d4c85e9034 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -46165,6 +46165,55 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxInlineTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxInlineTestGenerated.java index 25ef7377b86..81b735c49bb 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxInlineTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxInlineTestGenerated.java @@ -5093,6 +5093,52 @@ public class FirWasmCodegenBoxInlineTestGenerated extends AbstractFirWasmCodegen } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT") diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java index 88684f822cb..2b69a747eb9 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxInlineTestGenerated.java @@ -5093,6 +5093,52 @@ public class K1WasmCodegenBoxInlineTestGenerated extends AbstractK1WasmCodegenBo } } + @Nested + @TestMetadata("compiler/testData/codegen/boxInline/typeParameters") + @TestDataPath("$PROJECT_ROOT") + public class TypeParameters { + @Test + public void testAllFilesPresentInTypeParameters() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline/typeParameters"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.WASM, true); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/anonymousObject.kt"); + } + + @Test + @TestMetadata("basic.kt") + public void testBasic() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/basic.kt"); + } + + @Test + @TestMetadata("projectionTypeArguments.kt") + public void testProjectionTypeArguments() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/projectionTypeArguments.kt"); + } + + @Test + @TestMetadata("severalUpperBounds.kt") + public void testSeveralUpperBounds() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/severalUpperBounds.kt"); + } + + @Test + @TestMetadata("typeArgFromGenericBaseClass.kt") + public void testTypeArgFromGenericBaseClass() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/typeArgFromGenericBaseClass.kt"); + } + + @Test + @TestMetadata("uncheckedCastToNothing.kt") + public void testUncheckedCastToNothing() throws Exception { + runTest("compiler/testData/codegen/boxInline/typeParameters/uncheckedCastToNothing.kt"); + } + } + @Nested @TestMetadata("compiler/testData/codegen/boxInline/varargs") @TestDataPath("$PROJECT_ROOT")