IR: remove deprecated constructors of IrPropertyImpl
This commit is contained in:
@@ -24,11 +24,9 @@ import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.carriers.PropertyCarrier
|
||||
import org.jetbrains.kotlin.ir.descriptors.WrappedPropertyDescriptor
|
||||
import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.IrPropertySymbolImpl
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyExternal
|
||||
|
||||
abstract class IrPropertyCommonImpl(
|
||||
startOffset: Int,
|
||||
@@ -126,91 +124,6 @@ class IrPropertyImpl(
|
||||
override val isFakeOverride: Boolean = origin == IrDeclarationOrigin.FAKE_OVERRIDE
|
||||
) : IrPropertyCommonImpl(startOffset, endOffset, origin, name, visibility, modality, isVar, isConst, isLateinit, isDelegated, isExternal, isExpect, isFakeOverride) {
|
||||
|
||||
@Deprecated(message = "Don't use descriptor-based API for IrProperty", level = DeprecationLevel.WARNING)
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
descriptor: PropertyDescriptor,
|
||||
symbol: IrPropertySymbol = IrPropertySymbolImpl(descriptor),
|
||||
name: Name = descriptor.name,
|
||||
visibility: Visibility = descriptor.visibility,
|
||||
modality: Modality = descriptor.modality,
|
||||
isVar: Boolean = descriptor.isVar,
|
||||
isConst: Boolean = descriptor.isConst,
|
||||
isLateinit: Boolean = descriptor.isLateInit,
|
||||
isDelegated: Boolean = descriptor.isDelegated,
|
||||
isExternal: Boolean = descriptor.isExternal
|
||||
) : this(
|
||||
startOffset, endOffset, origin,
|
||||
symbol,
|
||||
name, visibility, modality,
|
||||
isVar = isVar,
|
||||
isConst = isConst,
|
||||
isLateinit = isLateinit,
|
||||
isDelegated = isDelegated,
|
||||
isExternal = isExternal,
|
||||
isExpect = descriptor.isExpect
|
||||
)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated(message = "Don't use descriptor-based API for IrProperty", level = DeprecationLevel.WARNING)
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
isDelegated: Boolean,
|
||||
descriptor: PropertyDescriptor
|
||||
) : this(
|
||||
startOffset, endOffset, origin, descriptor,
|
||||
name = descriptor.name,
|
||||
visibility = descriptor.visibility,
|
||||
modality = descriptor.modality,
|
||||
isVar = descriptor.isVar,
|
||||
isConst = descriptor.isConst,
|
||||
isLateinit = descriptor.isLateInit,
|
||||
isDelegated = isDelegated,
|
||||
isExternal = descriptor.isEffectivelyExternal()
|
||||
)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated(message = "Don't use descriptor-based API for IrProperty", level = DeprecationLevel.WARNING)
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
descriptor: PropertyDescriptor
|
||||
) : this(startOffset, endOffset, origin, descriptor.isDelegated, descriptor)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated(message = "Don't use descriptor-based API for IrProperty", level = DeprecationLevel.WARNING)
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
isDelegated: Boolean,
|
||||
descriptor: PropertyDescriptor,
|
||||
backingField: IrField?
|
||||
) : this(startOffset, endOffset, origin, isDelegated, descriptor) {
|
||||
this.backingField = backingField
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Deprecated(message = "Don't use descriptor-based API for IrProperty", level = DeprecationLevel.WARNING)
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
origin: IrDeclarationOrigin,
|
||||
isDelegated: Boolean,
|
||||
descriptor: PropertyDescriptor,
|
||||
backingField: IrField?,
|
||||
getter: IrSimpleFunction?,
|
||||
setter: IrSimpleFunction?
|
||||
) : this(startOffset, endOffset, origin, isDelegated, descriptor, backingField) {
|
||||
this.getter = getter
|
||||
this.setter = setter
|
||||
}
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
|
||||
+8
-3
@@ -232,9 +232,14 @@ interface IrBuilderExtension {
|
||||
assert(irPropertySymbol.isBound || declare)
|
||||
|
||||
if (declare) {
|
||||
IrPropertyImpl(propertyParent.startOffset, propertyParent.endOffset, SERIALIZABLE_PLUGIN_ORIGIN, propertyDescriptor, irPropertySymbol).also {
|
||||
it.parent = propertyParent
|
||||
propertyParent.addMember(it)
|
||||
with(propertyDescriptor) {
|
||||
IrPropertyImpl(
|
||||
propertyParent.startOffset, propertyParent.endOffset, SERIALIZABLE_PLUGIN_ORIGIN, irPropertySymbol,
|
||||
name, visibility, modality, isVar, isConst, isLateInit, isDelegated, isExternal
|
||||
).also {
|
||||
it.parent = propertyParent
|
||||
propertyParent.addMember(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
val irProperty = irPropertySymbol.owner
|
||||
|
||||
Reference in New Issue
Block a user