IR: symbol for IrLocalDelegatedProperty

This commit is contained in:
Dmitry Petrov
2019-03-21 13:48:44 +03:00
parent aa6ba1cd4a
commit 6ca61cf347
15 changed files with 128 additions and 34 deletions
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.ir.builders.irBlockBody
import org.jetbrains.kotlin.ir.builders.irGet
import org.jetbrains.kotlin.ir.builders.irReturn
import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.declarations.impl.IrLocalDelegatedPropertyImpl
import org.jetbrains.kotlin.ir.descriptors.IrLocalDelegatedPropertyDelegateDescriptor
import org.jetbrains.kotlin.ir.descriptors.IrLocalDelegatedPropertyDelegateDescriptorImpl
import org.jetbrains.kotlin.ir.descriptors.IrPropertyDelegateDescriptor
@@ -228,7 +227,7 @@ class DelegatedPropertyGenerator(declarationGenerator: DeclarationGenerator) : D
): IrLocalDelegatedProperty {
val kPropertyType = getKPropertyTypeForLocalDelegatedProperty(variableDescriptor)
val irLocalDelegatedProperty = IrLocalDelegatedPropertyImpl(
val irLocalDelegatedProperty = context.symbolTable.declareLocalDelegatedProperty(
ktProperty.startOffsetSkippingComments, ktProperty.endOffset, IrDeclarationOrigin.DEFINED,
variableDescriptor,
variableDescriptor.type.toIrType()
@@ -121,7 +121,7 @@ class ReflectionReferencesGenerator(statementGenerator: StatementGenerator) : St
return IrLocalDelegatedPropertyReferenceImpl(
startOffset, endOffset, type.toIrType(),
variableDescriptor,
context.symbolTable.referenceLocalDelegatedProperty(variableDescriptor),
irDelegateSymbol, getterSymbol, setterSymbol,
origin
)