FIR: Add test on ambiguous vararg

Fix is in the two previous commits
This commit is contained in:
Denis.Zharkov
2020-12-28 13:19:23 +03:00
parent 8c7b23a8dd
commit acbf382d04
5 changed files with 48 additions and 0 deletions
@@ -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")
}
@@ -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");
@@ -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");
@@ -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");