Set receivers for inline class default function stub calls
Default function stubs have dispatch and receiver parameters, but inline class methods are static by design with receivers as ordinary parameters. So, take these parameters and set them as receivers during lowerings. #KT-46230: Fixed
This commit is contained in:
committed by
teamcityserver
parent
31420a934c
commit
ac7538a269
+33
@@ -16384,6 +16384,39 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
public void testKt27416() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/kt27416.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class OverrideFunctionWithDefaultParameter extends AbstractLightAnalysisModeTest {
|
||||
@TestMetadata("all.kt")
|
||||
public void ignoreAll() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("all-compatibility.kt")
|
||||
public void ignoreAll_compatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/all-compatibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compatibility.kt")
|
||||
public void ignoreCompatibility() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/compatibility.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("default.kt")
|
||||
public void ignoreDefault() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter/default.kt");
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInOverrideFunctionWithDefaultParameter() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses/defaultParameterValues/overrideFunctionWithDefaultParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/inlineClasses/funInterface")
|
||||
|
||||
Reference in New Issue
Block a user