Do not count receivers in default parameters mask

If we implement default function with default parameters in inline
class, the receivers will be added to parameter list
(see ac7538a269). But since they
are not present in source parameters, we should not count them when we
compute mask for default parameters.

 #KT-49977 Fixed
This commit is contained in:
Ilmir Usmanov
2021-11-29 19:25:57 +01:00
committed by Space
parent 7ccd1309e6
commit 8e8a6e6108
17 changed files with 304 additions and 9 deletions
@@ -20939,6 +20939,41 @@ public class NativeExtBlackBoxTestGenerated extends AbstractNativeBlackBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt27416.kt");
}
@Nested
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter")
@TestDataPath("$PROJECT_ROOT")
@NativeBlackBoxTestCaseGroupProvider(ExtTestCaseGroupProvider.class)
public class DefaultWithDefaultParameter {
@Test
@TestMetadata("all.kt")
public void testAll() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all.kt");
}
@Test
public void testAllFilesPresentInDefaultWithDefaultParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, true);
}
@Test
@TestMetadata("all-compatibility.kt")
public void testAll_compatibility() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/all-compatibility.kt");
}
@Test
@TestMetadata("compatibility.kt")
public void testCompatibility() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/compatibility.kt");
}
@Test
@TestMetadata("default.kt")
public void testDefault() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/defaultWithDefaultParameter/default.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter")
@TestDataPath("$PROJECT_ROOT")