diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 313ff447e21..33027b8043a 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -16235,6 +16235,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("ambiguousJavaVararg.kt") + public void testAmbiguousJavaVararg() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt"); + } + @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); diff --git a/compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt b/compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt new file mode 100644 index 00000000000..62a4ceae285 --- /dev/null +++ b/compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt @@ -0,0 +1,28 @@ +// FILE: JavaInterface.java + +public interface JavaInterface { + String foo(Object... obj); + + String foo(String... str); +} + +// FILE: JavaClass.java + +public class JavaClass implements JavaInterface { + public String foo(Object... obj) { + return "FAIL"; + } + + public String foo(String... str) { + return "OK"; + } +} + +// FILE: test.kt +// TARGET_BACKEND: JVM + +class KotlinClass : JavaClass() + +fun box(): String { + return KotlinClass().foo("alpha", "omega") +} diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 84d19bdf9fa..b70bfdeb804 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -16235,6 +16235,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("ambiguousJavaVararg.kt") + public void testAmbiguousJavaVararg() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt"); + } + @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index fcca375efda..9455b02a30d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -16235,6 +16235,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("ambiguousJavaVararg.kt") + public void testAmbiguousJavaVararg() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt"); + } + @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index d211a6110df..36577e9fa5f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -16235,6 +16235,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("ambiguousJavaVararg.kt") + public void testAmbiguousJavaVararg() throws Exception { + runTest("compiler/testData/codegen/box/javaInterop/ambiguousJavaVararg.kt"); + } + @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt");