FIR2IR: add local delegated property generation

This commit is contained in:
pyos
2020-09-07 14:11:17 +02:00
committed by Mikhail Glukhikh
parent 4792be2522
commit f198a19ab0
43 changed files with 211 additions and 217 deletions
@@ -966,17 +966,19 @@ class SymbolTable(
endOffset: Int,
origin: IrDeclarationOrigin,
descriptor: VariableDescriptorWithAccessors,
type: IrType
type: IrType,
factory: (IrLocalDelegatedPropertySymbol) -> IrLocalDelegatedProperty = {
irFactory.createLocalDelegatedProperty(
startOffset, endOffset, origin, it, nameProvider.nameForDeclaration(descriptor), type, descriptor.isVar
)
}
): IrLocalDelegatedProperty =
localDelegatedPropertySymbolTable.declareLocal(
descriptor,
{ IrLocalDelegatedPropertySymbolImpl(descriptor) },
) {
irFactory.createLocalDelegatedProperty(
startOffset, endOffset, origin, it, nameProvider.nameForDeclaration(descriptor), type, descriptor.isVar
).apply {
metadata = MetadataSource.LocalDelegatedProperty(descriptor)
}
factory
).apply {
metadata = MetadataSource.LocalDelegatedProperty(descriptor)
}
fun referenceLocalDelegatedProperty(descriptor: VariableDescriptorWithAccessors) =