Report argument number mismatch nicely on wrong 'call()' invocation

The default Java reflection message in such case is not very helpful: "wrong
number of arguments"
This commit is contained in:
Alexander Udalov
2015-08-04 19:39:09 +03:00
parent 9c522b4d49
commit 3091f2af3b
4 changed files with 174 additions and 45 deletions
@@ -2856,6 +2856,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
doTestWithStdlib(fileName);
}
@TestMetadata("incorrectNumberOfArguments.kt")
public void testIncorrectNumberOfArguments() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/call/incorrectNumberOfArguments.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("innerClassConstructor.kt")
public void testInnerClassConstructor() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/reflection/call/innerClassConstructor.kt");