Minor: cleanup IrLazyProperty

This commit is contained in:
Dmitry Petrov
2019-04-22 17:13:04 +03:00
parent 1b5d077452
commit 18c3778250
@@ -35,7 +35,7 @@ class IrLazyProperty(
override val isLateinit: Boolean,
override val isDelegated: Boolean,
override val isExternal: Boolean,
private val stubGenerator: DeclarationStubGenerator,
stubGenerator: DeclarationStubGenerator,
typeTranslator: TypeTranslator,
private val bindingContext: BindingContext? = null
) :
@@ -74,18 +74,18 @@ class IrLazyProperty(
override var backingField: IrField? by lazyVar {
if (descriptor.hasBackingField(bindingContext)) {
stubGenerator.generateFieldStub(descriptor).apply {
correspondingProperty = this@IrLazyProperty
correspondingPropertySymbol = this@IrLazyProperty.symbol
}
} else null
}
override var getter: IrSimpleFunction? by lazyVar {
descriptor.getter?.let { stubGenerator.generateFunctionStub(it, createPropertyIfNeeded = false) }?.apply {
correspondingProperty = this@IrLazyProperty
correspondingPropertySymbol = this@IrLazyProperty.symbol
}
}
override var setter: IrSimpleFunction? by lazyVar {
descriptor.setter?.let { stubGenerator.generateFunctionStub(it, createPropertyIfNeeded = false) }?.apply {
correspondingProperty = this@IrLazyProperty
correspondingPropertySymbol = this@IrLazyProperty.symbol
}
}