From 884e6e15e9dea24eb6dd110811fb7afc7c744092 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Mon, 14 Jan 2019 17:18:29 +0300 Subject: [PATCH] Added a comment for separate treatment of properties in IrDeserializer interface. --- .../src/org/jetbrains/kotlin/ir/util/SymbolTable.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt index 751a396fe4d..8cf606552b1 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/SymbolTable.kt @@ -34,6 +34,12 @@ import org.jetbrains.kotlin.ir.visitors.acceptVoid interface IrDeserializer { fun findDeserializedDeclaration(symbol: IrSymbol): IrDeclaration? + // We need a separate method for properties, because properties + // are treated differently in the SymbolTable. + // See SymbolTable.propertyTable and SymbolTable.referenceProperty. + // There was an attempt to solve this asymmetry in the symbol table + // using property symbols, but it was not successful. + // For now we have to live with a special treatment of properties. fun findDeserializedDeclaration(propertyDescriptor: PropertyDescriptor): IrProperty? fun declareForwardDeclarations() } @@ -498,4 +504,4 @@ inline fun SymbolTable.withScope(owner: D, block: val result = block(owner) leaveScope(owner) return result -} \ No newline at end of file +}