Varargs: add test
This commit is contained in:
Generated
+5
@@ -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");
|
||||
|
||||
+10
@@ -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")
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Generated
+5
@@ -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");
|
||||
|
||||
Generated
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user