FIR: Add test on ambiguous vararg
Fix is in the two previous commits
This commit is contained in:
Generated
+5
@@ -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");
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user