Psi2ir: do not generate default accessor body for expect properties

Because generateDefaultGetterBody/generateDefaultSetterBody reference
the property's backing field, which in case of extension properties
leads to an error "Unbound symbols not allowed" because extension
property cannot have a backing field.

In some way, this check is similar to the `isExpect` check in
`generatePrimaryConstructor`.
This commit is contained in:
Alexander Udalov
2021-03-09 15:35:57 +01:00
parent 5fc9f3bc17
commit bdaeaca5ae
10 changed files with 71 additions and 3 deletions
@@ -20804,6 +20804,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/multiplatform/expectClassInJvmMultifileFacade.kt");
}
@TestMetadata("expectProperty.kt")
public void testExpectProperty() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/expectProperty.kt");
}
@TestMetadata("noArgActualConstructor.kt")
public void testNoArgActualConstructor() throws Exception {
runTest("compiler/testData/codegen/box/multiplatform/noArgActualConstructor.kt");