JVM_IR: do not set ACC_VARARGS if vararg is not the last parameter

Fun fact: this is not actually validated when loading the class; and
even when compiling a java file against a class file that does this,
only javac 9 has a check (1.8 and before simply crashes with
NullPointerException somewhere deep inside the compiler).
This commit is contained in:
pyos
2019-11-20 12:06:17 +01:00
committed by max-kammerer
parent 7adffe0007
commit 7c015564ce
6 changed files with 36 additions and 1 deletions
@@ -27773,6 +27773,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/vararg/kt796_797.kt");
}
@TestMetadata("notInLastPosition.kt")
public void testNotInLastPosition() throws Exception {
runTest("compiler/testData/codegen/box/vararg/notInLastPosition.kt");
}
@TestMetadata("singleAssignmentToVarargsInFunction.kt")
public void testSingleAssignmentToVarargsInFunction() throws Exception {
runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt");