[FIR] Add cleanup of tower data for imports
This commit is contained in:
+8
-6
@@ -50,13 +50,15 @@ open class FirBodyResolveTransformer(
|
|||||||
context.file = file
|
context.file = file
|
||||||
packageFqName = file.packageFqName
|
packageFqName = file.packageFqName
|
||||||
return withScopeCleanup(context.fileImportsScope) {
|
return withScopeCleanup(context.fileImportsScope) {
|
||||||
val importingScopes = createImportingScopes(file, session, components.scopeSession)
|
context.withTowerDataCleanup {
|
||||||
context.fileImportsScope += importingScopes
|
val importingScopes = createImportingScopes(file, session, components.scopeSession)
|
||||||
context.addNonLocalTowerDataElements(importingScopes.map { it.asTowerDataElement(isLocal = false) })
|
context.fileImportsScope += importingScopes
|
||||||
|
context.addNonLocalTowerDataElements(importingScopes.map { it.asTowerDataElement(isLocal = false) })
|
||||||
|
|
||||||
file.replaceResolvePhase(transformerPhase)
|
file.replaceResolvePhase(transformerPhase)
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
transformDeclarationContent(file, data) as CompositeTransformResult<FirFile>
|
transformDeclarationContent(file, data) as CompositeTransformResult<FirFile>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user