[IR] Introduce & use declaration-based SymbolTable.withReferenceScope

This commit is contained in:
Mikhail Glukhikh
2020-06-05 09:41:23 +03:00
parent 7a0f986823
commit 1c2fbb61fe
2 changed files with 12 additions and 3 deletions
@@ -136,7 +136,7 @@ interface IrBuilderExtension {
fun <T : IrDeclaration> T.buildWithScope(builder: (T) -> Unit): T =
also { irDeclaration ->
compilerContext.symbolTable.withReferenceScope(irDeclaration.descriptor) {
compilerContext.symbolTable.withReferenceScope(irDeclaration) {
builder(irDeclaration)
}
}