From e46a4246d27155f77ad77ed9789520eb99c63943 Mon Sep 17 00:00:00 2001 From: Jinseong Jeon Date: Fri, 20 Mar 2020 22:04:51 +0300 Subject: [PATCH] FIR: regard property accessor without body as FirDefaultPropertyAccessor --- .../kotlin/fir/builder/RawFirBuilder.kt | 20 +++++++++++++------ .../RawFirBuilderTotalKotlinTestCase.kt | 4 +++- .../impl/FirDefaultPropertyAccessor.kt | 16 +++++++++++++++ .../bridges/propertyAccessorsWithoutBody.kt | 1 - .../property/privateSetterInsideClass.kt | 1 - .../testData/codegen/box/classes/kt9642.kt | 1 - .../codegen/box/jvmName/propertyName.kt | 1 - .../codegen/box/jvmStatic/privateSetter.kt | 1 - .../codegen/box/jvmStatic/propertyAccess.kt | 1 - .../codegen/box/package/invokespecial.kt | 1 - .../box/properties/accessToPrivateProperty.kt | 1 - .../box/properties/accessToPrivateSetter.kt | 1 - .../box/properties/classObjectProperties.kt | 1 - .../testData/codegen/box/properties/kt8928.kt | 1 - .../box/properties/lateinit/privateSetter.kt | 1 - .../lateinit/privateSetterFromLambda.kt | 1 - .../privateAccessorOfOverriddenProperty.kt | 1 - .../codegen/box/syntheticAccessors/kt9717.kt | 1 - .../kt9717DifferentPackages.kt | 1 - .../noPrivateNoAccessorsInMultiFileFacade2.kt | 1 - .../declarations/classLevelProperties.fir.txt | 14 ++++++++++--- .../packageLevelProperties.fir.txt | 12 ++++++++--- .../expressions/propertyReferences.fir.txt | 20 +++++++++++++------ 23 files changed, 67 insertions(+), 36 deletions(-) diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt index f469d7aa9f8..cd20b938da2 100644 --- a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt +++ b/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.builder.* import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl +import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertySetter import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind @@ -242,13 +243,16 @@ class RawFirBuilder( propertyTypeRef: FirTypeRef, isGetter: Boolean, ): FirPropertyAccessor { - if (this == null) { + if (this == null || !hasBody()) { val propertySource = property.toFirSourceElement() - return if (isGetter) { - FirDefaultPropertyGetter(propertySource, baseSession, propertyTypeRef, property.visibility) - } else { - FirDefaultPropertySetter(propertySource, baseSession, propertyTypeRef, property.visibility) - } + val accessorVisibility = this?.visibility ?: property.visibility + return FirDefaultPropertyAccessor + .createGetterOrSetter(propertySource, baseSession, propertyTypeRef, accessorVisibility, isGetter) + .also { + if (this != null) { + it.extractAnnotationsFrom(this) + } + } } val source = this.toFirSourceElement() val accessorTarget = FirFunctionTarget(labelName = null, isLambda = false) @@ -343,6 +347,10 @@ class RawFirBuilder( } } + private fun FirDefaultPropertyAccessor.extractAnnotationsFrom(annotated: KtAnnotated) { + annotated.extractAnnotationsTo(this.annotations) + } + private fun KtAnnotated.extractAnnotationsTo(container: MutableList) { for (annotationEntry in annotationEntries) { container += annotationEntry.convert() diff --git a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt b/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt index bda5f2aaa8f..fcfeb1393e4 100644 --- a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt +++ b/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.fir.references.FirErrorNamedReference import org.jetbrains.kotlin.fir.render import org.jetbrains.kotlin.fir.visitors.FirVisitorVoid import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.psiUtil.getStartOffsetIn import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType import org.jetbrains.kotlin.psi.psiUtil.parents import org.jetbrains.kotlin.test.JUnit3RunnerWithInners @@ -258,7 +259,8 @@ class RawFirBuilderTotalKotlinTestCase : AbstractRawFirBuilderTestCase() { (it.parent is KtUserType || it.parent is KtInstanceExpressionWithLabel || it.parent is KtValueArgumentName || it.parent is KtTypeConstraint) || it.getStrictParentOfType() != null || - it.getStrictParentOfType() != null + it.getStrictParentOfType() != null || + (it is KtPropertyAccessor && !it.hasBody()) } if (psiSetDirect.isNotEmpty()) { println("Total of $counter files processed successfully") diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt index 3b0ac83127f..61d122493f6 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt @@ -49,6 +49,22 @@ abstract class FirDefaultPropertyAccessor( final override var body: FirBlock? get() = null set(_) {} + + companion object { + fun createGetterOrSetter( + source: FirSourceElement?, + session: FirSession, + propertyTypeRef: FirTypeRef, + visibility: Visibility, + isGetter: Boolean + ): FirDefaultPropertyAccessor { + return if (isGetter) { + FirDefaultPropertyGetter(source, session, propertyTypeRef, visibility) + } else { + FirDefaultPropertySetter(source, session, propertyTypeRef, visibility) + } + } + } } class FirDefaultPropertyGetter( diff --git a/compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt b/compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt index d2b2ee5adb8..82a9b0b930c 100644 --- a/compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt +++ b/compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR open class A { open var x: T = "Fail" as T get diff --git a/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt b/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt index 564deeddb1c..8674d12a3a8 100644 --- a/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt +++ b/compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR import kotlin.reflect.KMutableProperty class Bar(name: String) { diff --git a/compiler/testData/codegen/box/classes/kt9642.kt b/compiler/testData/codegen/box/classes/kt9642.kt index 90ac00624fe..414954aab60 100644 --- a/compiler/testData/codegen/box/classes/kt9642.kt +++ b/compiler/testData/codegen/box/classes/kt9642.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Outer { class Nested { fun fn(): String { diff --git a/compiler/testData/codegen/box/jvmName/propertyName.kt b/compiler/testData/codegen/box/jvmName/propertyName.kt index e3fe2bb6d93..c90d367e974 100644 --- a/compiler/testData/codegen/box/jvmName/propertyName.kt +++ b/compiler/testData/codegen/box/jvmName/propertyName.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmStatic/privateSetter.kt b/compiler/testData/codegen/box/jvmStatic/privateSetter.kt index 1653e145e45..606edff3df7 100644 --- a/compiler/testData/codegen/box/jvmStatic/privateSetter.kt +++ b/compiler/testData/codegen/box/jvmStatic/privateSetter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/jvmStatic/propertyAccess.kt b/compiler/testData/codegen/box/jvmStatic/propertyAccess.kt index 475e97615d8..c76a2cf262c 100644 --- a/compiler/testData/codegen/box/jvmStatic/propertyAccess.kt +++ b/compiler/testData/codegen/box/jvmStatic/propertyAccess.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/package/invokespecial.kt b/compiler/testData/codegen/box/package/invokespecial.kt index 8458686be3f..ca244d2703f 100644 --- a/compiler/testData/codegen/box/package/invokespecial.kt +++ b/compiler/testData/codegen/box/package/invokespecial.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/properties/accessToPrivateProperty.kt b/compiler/testData/codegen/box/properties/accessToPrivateProperty.kt index 42c9af67892..b898fa5689e 100644 --- a/compiler/testData/codegen/box/properties/accessToPrivateProperty.kt +++ b/compiler/testData/codegen/box/properties/accessToPrivateProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class A { private var foo = 1 get() { diff --git a/compiler/testData/codegen/box/properties/accessToPrivateSetter.kt b/compiler/testData/codegen/box/properties/accessToPrivateSetter.kt index 1d0aa647896..b4ed914beba 100644 --- a/compiler/testData/codegen/box/properties/accessToPrivateSetter.kt +++ b/compiler/testData/codegen/box/properties/accessToPrivateSetter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS diff --git a/compiler/testData/codegen/box/properties/classObjectProperties.kt b/compiler/testData/codegen/box/properties/classObjectProperties.kt index 1ea6ae4835e..1a48f5eb5f4 100644 --- a/compiler/testData/codegen/box/properties/classObjectProperties.kt +++ b/compiler/testData/codegen/box/properties/classObjectProperties.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class Test { companion object { diff --git a/compiler/testData/codegen/box/properties/kt8928.kt b/compiler/testData/codegen/box/properties/kt8928.kt index 75a8d078701..bafc93f62b3 100644 --- a/compiler/testData/codegen/box/properties/kt8928.kt +++ b/compiler/testData/codegen/box/properties/kt8928.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class App { fun init() { s = "OK" diff --git a/compiler/testData/codegen/box/properties/lateinit/privateSetter.kt b/compiler/testData/codegen/box/properties/lateinit/privateSetter.kt index 54cd22c8ddf..75bdc125e64 100644 --- a/compiler/testData/codegen/box/properties/lateinit/privateSetter.kt +++ b/compiler/testData/codegen/box/properties/lateinit/privateSetter.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { lateinit var x: String private set diff --git a/compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt b/compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt index 1ea3c8df4fb..80baa4ec688 100644 --- a/compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt +++ b/compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR class My { lateinit var x: String private set diff --git a/compiler/testData/codegen/box/properties/privateAccessorOfOverriddenProperty.kt b/compiler/testData/codegen/box/properties/privateAccessorOfOverriddenProperty.kt index ce932446621..28762ed8d2b 100644 --- a/compiler/testData/codegen/box/properties/privateAccessorOfOverriddenProperty.kt +++ b/compiler/testData/codegen/box/properties/privateAccessorOfOverriddenProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR interface A { val foo: String } diff --git a/compiler/testData/codegen/box/syntheticAccessors/kt9717.kt b/compiler/testData/codegen/box/syntheticAccessors/kt9717.kt index 17c8fd7763f..f2438b5a591 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/kt9717.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/kt9717.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // FILE: box.kt object Test { diff --git a/compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt b/compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt index 2e7801834c9..d201d7c2a39 100644 --- a/compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt +++ b/compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // FILE: a.kt package a diff --git a/compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt b/compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt index 9e37c7b2830..eea28c9b194 100644 --- a/compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt +++ b/compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt index 893bfca2501..48c653a8d5c 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.fir.txt @@ -72,17 +72,25 @@ FILE fqName: fileName:/classLevelProperties.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private' type=kotlin.Int origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null - FUN name: visibility:private modality:FINAL <> ($this:.C, value:kotlin.Int) returnType:kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.C, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [var] $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name:value index:0 type:kotlin.Int + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null + value: GET_VAR ': kotlin.Int declared in .C.' type=kotlin.Int origin=null PROPERTY name:test6 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final] EXPRESSION_BODY CONST Int type=kotlin.Int value=1 - FUN name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.C) returnType:kotlin.Int correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] $this: VALUE_PARAMETER name: type:.C + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt index d5e5c56fae2..a3e9d523bf3 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.fir.txt @@ -53,15 +53,21 @@ FILE fqName: fileName:/packageLevelProperties.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null - FUN name: visibility:private modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL [var] - VALUE_PARAMETER name:value index:0 type:kotlin.Int + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null + value: GET_VAR ': kotlin.Int declared in .' type=kotlin.Int origin=null PROPERTY name:test6 visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final,static] EXPRESSION_BODY CONST Int type=kotlin.Int value=1 - FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL [val] + BLOCK_BODY + RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' + GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test6 type:kotlin.Int visibility:private [final,static]' type=kotlin.Int origin=null PROPERTY name:test7 visibility:public modality:FINAL [delegated,val] FIELD PROPERTY_DELEGATE name:test7$delegate type:kotlin.Lazy visibility:private [final,static] EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt index fbe76c6ddf9..e883e33bbe7 100644 --- a/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt +++ b/compiler/testData/ir/irText/expressions/propertyReferences.fir.txt @@ -48,10 +48,14 @@ FILE fqName: fileName:/propertyReferences.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithPrivateSet type:kotlin.Int visibility:private' type=kotlin.Int origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null - FUN name: visibility:private modality:FINAL <> ($this:.C, value:kotlin.Int) returnType:kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.C, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:varWithPrivateSet visibility:public modality:FINAL [var] $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name:value index:0 type:kotlin.Int + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithPrivateSet type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null + value: GET_VAR ': kotlin.Int declared in .C.' type=kotlin.Int origin=null PROPERTY name:varWithProtectedSet visibility:public modality:FINAL [var] FIELD PROPERTY_BACKING_FIELD name:varWithProtectedSet type:kotlin.Int visibility:private EXPRESSION_BODY @@ -63,10 +67,14 @@ FILE fqName: fileName:/propertyReferences.kt RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in .C' GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithProtectedSet type:kotlin.Int visibility:private' type=kotlin.Int origin=null receiver: GET_VAR ': .C declared in .C.' type=.C origin=null - FUN name: visibility:protected modality:FINAL <> ($this:.C, value:kotlin.Int) returnType:kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:protected modality:FINAL <> ($this:.C, :kotlin.Int) returnType:kotlin.Unit correspondingProperty: PROPERTY name:varWithProtectedSet visibility:public modality:FINAL [var] $this: VALUE_PARAMETER name: type:.C - VALUE_PARAMETER name:value index:0 type:kotlin.Int + VALUE_PARAMETER name: index:0 type:kotlin.Int + BLOCK_BODY + SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:varWithProtectedSet type:kotlin.Int visibility:private' type=kotlin.Unit origin=null + receiver: GET_VAR ': .C declared in .C.' type=.C origin=null + value: GET_VAR ': kotlin.Int declared in .C.' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any @@ -270,7 +278,7 @@ FILE fqName: fileName:/propertyReferences.kt PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_varWithPrivateSet type:kotlin.reflect.KMutableProperty1<.C, kotlin.Int> visibility:private [final,static] EXPRESSION_BODY - PROPERTY_REFERENCE 'public final varWithPrivateSet: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithPrivateSet type:kotlin.Int visibility:private' getter='public final fun (): kotlin.Int declared in .C' setter='private final fun (value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=null + PROPERTY_REFERENCE 'public final varWithPrivateSet: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithPrivateSet type:kotlin.Int visibility:private' getter='public final fun (): kotlin.Int declared in .C' setter='private final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.reflect.KMutableProperty1<.C, kotlin.Int> correspondingProperty: PROPERTY name:test_varWithPrivateSet visibility:public modality:FINAL [val] BLOCK_BODY @@ -279,7 +287,7 @@ FILE fqName: fileName:/propertyReferences.kt PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val] FIELD PROPERTY_BACKING_FIELD name:test_varWithProtectedSet type:kotlin.reflect.KMutableProperty1<.C, kotlin.Int> visibility:private [final,static] EXPRESSION_BODY - PROPERTY_REFERENCE 'public final varWithProtectedSet: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithProtectedSet type:kotlin.Int visibility:private' getter='public final fun (): kotlin.Int declared in .C' setter='protected final fun (value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=null + PROPERTY_REFERENCE 'public final varWithProtectedSet: kotlin.Int [var]' field='FIELD PROPERTY_BACKING_FIELD name:varWithProtectedSet type:kotlin.Int visibility:private' getter='public final fun (): kotlin.Int declared in .C' setter='protected final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.reflect.KMutableProperty1<.C, kotlin.Int> origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.reflect.KMutableProperty1<.C, kotlin.Int> correspondingProperty: PROPERTY name:test_varWithProtectedSet visibility:public modality:FINAL [val] BLOCK_BODY