Varargs: add test

This commit is contained in:
Georgy Bronnikov
2020-09-09 20:44:27 +03:00
parent 67d7bf3269
commit 8990344bb2
8 changed files with 45 additions and 0 deletions
@@ -12481,6 +12481,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -0,0 +1,10 @@
fun <T> f(x: T): T {
fun g(vararg xs: T): T {
return xs[0]
}
return g(x)
}
fun box() = f("OK")
@@ -13876,6 +13876,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -13876,6 +13876,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -12481,6 +12481,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -10736,6 +10736,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -10736,6 +10736,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");
@@ -10736,6 +10736,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInSupertype.kt");
}
@TestMetadata("boundTypeParameterInVararg.kt")
public void testBoundTypeParameterInVararg() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/boundTypeParameterInVararg.kt");
}
@TestMetadata("callBetweenLocalFunctions.kt")
public void testCallBetweenLocalFunctions() throws Exception {
runTest("compiler/testData/codegen/box/functions/localFunctions/callBetweenLocalFunctions.kt");