[IR] Remove deprecated correspondingProperty from IrSimpleFunction

This commit is contained in:
Roman Artemev
2019-10-28 11:24:32 +03:00
committed by romanart
parent a343a57207
commit ec1c2eb42d
5 changed files with 3 additions and 19 deletions
@@ -172,7 +172,8 @@ open class LateinitLowering(val context: CommonBackendContext) : FileLoweringPas
val receiver = expression.extensionReceiver as IrPropertyReference
val property = receiver.getter?.owner?.resolveFakeOverride()?.correspondingProperty!!.also { assert(it.isLateinit) }
val property =
receiver.getter?.owner?.resolveFakeOverride()?.correspondingPropertySymbol!!.owner.also { assert(it.isLateinit) }
val nullableField =
buildOrGetNullableField(property.backingField ?: error("Lateinit property is supposed to have backing field"))
@@ -30,9 +30,6 @@ interface IrSimpleFunction :
val isSuspend: Boolean
val isFakeOverride: Boolean
@Deprecated("Use correspondingPropertySymbol")
var correspondingProperty: IrProperty?
var correspondingPropertySymbol: IrPropertySymbol?
}
@@ -64,13 +64,6 @@ class IrFunctionImpl(
override val overriddenSymbols: MutableList<IrSimpleFunctionSymbol> = SmartList()
@Suppress("OverridingDeprecatedMember")
override var correspondingProperty: IrProperty?
get() = correspondingPropertySymbol?.owner
set(value) {
correspondingPropertySymbol = value?.symbol
}
override var correspondingPropertySymbol: IrPropertySymbol? = null
// Used by kotlin-native in InteropLowering.kt and IrUtils2.kt
@@ -89,13 +89,6 @@ class IrLazyFunction(
}
}
@Suppress("OverridingDeprecatedMember")
override var correspondingProperty: IrProperty?
get() = correspondingPropertySymbol?.owner
set(value) {
correspondingPropertySymbol = value?.symbol
}
override var correspondingPropertySymbol: IrPropertySymbol? = null
init {
@@ -88,7 +88,7 @@ open class DescriptorReferenceSerializer(
}
val discoverableDescriptorsDeclaration: IrDeclaration? = if (isAccessor) {
(realDeclaration as IrSimpleFunction).correspondingProperty!!
(realDeclaration as IrSimpleFunction).correspondingPropertySymbol!!.owner
} else if (isBackingField) {
(realDeclaration as IrField).correspondingProperty!!
} else if (isDefaultConstructor || isEnumEntry) {