Support function types with >= 23 parameters

See https://github.com/Kotlin/KEEP/issues/107

 #KT-13764 Fixed
This commit is contained in:
Alexander Udalov
2018-04-12 19:16:32 +02:00
parent 5c8afea68e
commit 56f509ba09
25 changed files with 943 additions and 55 deletions
@@ -8935,6 +8935,44 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt");
}
@TestMetadata("compiler/testData/codegen/box/functions/bigArity")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class BigArity extends AbstractIrJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
}
public void testAllFilesPresentInBigArity() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
}
@TestMetadata("function255.kt")
public void testFunction255() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/function255.kt");
}
@TestMetadata("instanceOfCallableReference.kt")
public void testInstanceOfCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/instanceOfCallableReference.kt");
}
@TestMetadata("invokeCallableReference.kt")
public void testInvokeCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/invokeCallableReference.kt");
}
@TestMetadata("invokeLambda.kt")
public void testInvokeLambda() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt");
}
@TestMetadata("subclass.kt")
public void testSubclass() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/subclass.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/functions/functionExpression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -14944,6 +14982,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/bigArity.kt");
}
@TestMetadata("callInstanceJavaMethod.kt")
public void testCallInstanceJavaMethod() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt");
@@ -16365,6 +16408,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/reflection/parameters/bigArity.kt");
}
@TestMetadata("boundInnerClassConstructor.kt")
public void testBoundInnerClassConstructor() throws Exception {
runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt");
@@ -9930,6 +9930,44 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt");
}
@TestMetadata("compiler/testData/codegen/box/functions/bigArity")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class BigArity extends AbstractJsCodegenBoxTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
}
public void testAllFilesPresentInBigArity() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/bigArity"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("function255.kt")
public void testFunction255() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/function255.kt");
}
@TestMetadata("instanceOfCallableReference.kt")
public void testInstanceOfCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/instanceOfCallableReference.kt");
}
@TestMetadata("invokeCallableReference.kt")
public void testInvokeCallableReference() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/invokeCallableReference.kt");
}
@TestMetadata("invokeLambda.kt")
public void testInvokeLambda() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/invokeLambda.kt");
}
@TestMetadata("subclass.kt")
public void testSubclass() throws Exception {
runTest("compiler/testData/codegen/box/functions/bigArity/subclass.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/functions/functionExpression")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -15939,6 +15977,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/bigArity.kt");
}
@TestMetadata("callInstanceJavaMethod.kt")
public void testCallInstanceJavaMethod() throws Exception {
runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt");
@@ -17360,6 +17403,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
}
@TestMetadata("bigArity.kt")
public void testBigArity() throws Exception {
runTest("compiler/testData/codegen/box/reflection/parameters/bigArity.kt");
}
@TestMetadata("boundInnerClassConstructor.kt")
public void testBoundInnerClassConstructor() throws Exception {
runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt");