Fix JvmOverloads generation for actual methods

`countDefaultParameters` uses `hasDefaultValue` to compute the number of
parameters which have default values, which handles actual parameters
(who have default values in the expected declaration) correctly. Thus,
`getRemainingParameters` should use it as well to determine the list of
parameters to be skipped in each generated overload

 #KT-23910 Fixed
This commit is contained in:
Alexander Udalov
2018-04-23 13:58:47 +02:00
parent 516e7df4b7
commit a8488cf298
5 changed files with 47 additions and 1 deletions
@@ -13288,6 +13288,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt");
}
@TestMetadata("jvmOverloads.kt")
public void testJvmOverloads() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/jvmOverloads.kt");
}
@TestMetadata("kt23239.kt")
public void testKt23239() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt");