diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index db1a23bcda8..c7e7597d849 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -20192,12 +20192,6 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20329,6 +20323,58 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 10d28a02b8c..2300af71102 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -20192,12 +20192,6 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20329,6 +20323,58 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 484960f97e1..3985279bac8 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -19921,12 +19921,6 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index e4b8bb7f98b..8275a312286 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -19921,12 +19921,6 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 5db5d0409bd..c0472d17ba9 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -19921,12 +19921,6 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt b/compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt similarity index 100% rename from compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt rename to compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt new file mode 100644 index 00000000000..a7316d0379a --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt @@ -0,0 +1,21 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +public class A { + public String foo(Integer x) { + return "FAIL"; + } +} + +// FILE: main.kt + +interface B { + fun foo(x: Int) = "OK" +} + +class C : A(), B + +fun box(): String { + return C().foo(42) +} diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt new file mode 100644 index 00000000000..1e9de8de711 --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +public class A { + public T foo(Integer x) { + return null; + } +} + +// FILE: main.kt + +interface B { + fun foo(x: Int) = "OK" +} + +open class C : A() + +class D : C(), B + +fun box(): String { + return D().foo(42) +} diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt new file mode 100644 index 00000000000..f0f7909a62f --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt @@ -0,0 +1,25 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +public class A { + public String foo(T x) { + return "FAIL"; + } +} + +// FILE: C.java + +public class C extends A {} + +// FILE: main.kt + +interface B { + fun foo(x: Int) = "OK" +} + +class D : C(), B + +fun box(): String { + return D().foo(42) +} diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt new file mode 100644 index 00000000000..53498ad3911 --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +public class A { + public String foo(T x) { + return "FAIL"; + } +} + +// FILE: main.kt + +interface B { + fun foo(x: Int) = "OK" +} + +open class C : A() + +class D : C(), B + +fun box(): String { + return D().foo(42) +} diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt new file mode 100644 index 00000000000..d5a966993fd --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +public class A { + public String foo(Integer x) { + return "FAIL"; + } +} + +// FILE: main.kt + +interface B { + fun foo(x: T) = "OK" +} + +interface D : B + +class E : A(), D + +fun box(): String { + return E().foo(42) +} diff --git a/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt new file mode 100644 index 00000000000..9b32c735482 --- /dev/null +++ b/compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt @@ -0,0 +1,23 @@ +// TARGET_BACKEND: JVM_IR +// ISSUE: KT-62554 +// FILE: A.java + +import org.jetbrains.annotations.*; + +public class A { + public String foo(@Nullable Integer x) { + return "FAIL"; + } +} + +// FILE: main.kt + +interface B { + fun foo(x: Int) = "OK" +} + +class C : A(), B + +fun box(): String { + return C().foo(42) +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java index 89ebbef0ebf..65cf80fff79 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/JvmAbiConsistencyTestBoxGenerated.java @@ -19921,12 +19921,6 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested 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 441c8c91296..11b586a416f 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 @@ -18948,6 +18948,16 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); + } + } } @Nested 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 f1d37689e05..1547a485a24 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 @@ -19921,12 +19921,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 635c1e2bb50..5301fb1d663 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -19921,12 +19921,6 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @Test - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @Test @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { @@ -20058,6 +20052,58 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack public void testVararg() throws Exception { runTest("compiler/testData/codegen/box/fir/vararg.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @Test + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @Test + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @Test + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @Nested diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 62be3837ebc..323b02f7118 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -16650,11 +16650,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/fir/notFoundClasses.kt"); } - @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") - public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { - runTest("compiler/testData/codegen/box/fir/primitiveDoubleJavaKotlinIntersection.kt"); - } - @TestMetadata("publicMethodCallViaPackagePrivateCommon.kt") public void testPublicMethodCallViaPackagePrivateCommon() throws Exception { runTest("compiler/testData/codegen/box/fir/publicMethodCallViaPackagePrivateCommon.kt"); @@ -16744,6 +16739,54 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testTypeParameterInNestedClass2() throws Exception { runTest("compiler/testData/codegen/box/fir/TypeParameterInNestedClass2.kt"); } + + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrimitivesInJava extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath); + } + + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + } + + @TestMetadata("primitiveDoubleJavaKotlinIntersection.kt") + public void testPrimitiveDoubleJavaKotlinIntersection() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/primitiveDoubleJavaKotlinIntersection.kt"); + } + + @TestMetadata("triangleWithFlexibleType.kt") + public void testTriangleWithFlexibleType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleType.kt"); + } + + @TestMetadata("triangleWithFlexibleTypeAndSubstitution.kt") + public void testTriangleWithFlexibleTypeAndSubstitution() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution.kt"); + } + + @TestMetadata("triangleWithFlexibleTypeAndSubstitution2.kt") + public void testTriangleWithFlexibleTypeAndSubstitution2() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution2.kt"); + } + + @TestMetadata("triangleWithFlexibleTypeAndSubstitution3.kt") + public void testTriangleWithFlexibleTypeAndSubstitution3() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution3.kt"); + } + + @TestMetadata("triangleWithFlexibleTypeAndSubstitution5.kt") + public void testTriangleWithFlexibleTypeAndSubstitution5() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithFlexibleTypeAndSubstitution5.kt"); + } + + @TestMetadata("triangleWithNullableType.kt") + public void testTriangleWithNullableType() throws Exception { + runTest("compiler/testData/codegen/box/fir/primitivesInJava/triangleWithNullableType.kt"); + } + } } @TestMetadata("compiler/testData/codegen/box/fullJdk") 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 7b429d3b879..efbcbcec409 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 @@ -14826,6 +14826,16 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @Nested diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index bbccd03e8ee..02adb9e7d8e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -14826,6 +14826,16 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } } @Nested 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 8d788a09b51..243ad8dcefd 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 @@ -14826,6 +14826,16 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); + } + } } @Nested 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 71f814a59aa..8363a6d8fac 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 @@ -14826,6 +14826,16 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index b543f9d6910..f82689f96ce 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -16688,6 +16688,19 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index e12901fcc97..bf9f6cfc1d6 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -17076,6 +17076,21 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + @Tag("frontend-fir") + @FirPipeline() + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 5d1a8e64591..45b2f73e8ee 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -16300,6 +16300,17 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + } } @Nested diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 75fe6db1691..79c83cf3921 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -16689,6 +16689,19 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + @UseExtTestCaseGroupProvider() + @UsePartialLinkage(mode = Mode.DISABLED) + @Tag("no-partial-linkage-may-be-skipped") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); + } + } } @Nested diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index e7f912a2b65..5a5f4dd0b68 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -14802,6 +14802,16 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } } @Nested diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 80f49dff6c8..a7fcb2f4257 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -14802,6 +14802,16 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest public void testToLong() throws Exception { runTest("compiler/testData/codegen/box/fir/toLong.kt"); } + + @Nested + @TestMetadata("compiler/testData/codegen/box/fir/primitivesInJava") + @TestDataPath("$PROJECT_ROOT") + public class PrimitivesInJava { + @Test + public void testAllFilesPresentInPrimitivesInJava() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/fir/primitivesInJava"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); + } + } } @Nested