FIR checkers: use ScopeSession from resolve when possible

This commit is contained in:
Mikhail Glukhikh
2021-03-18 14:33:54 +03:00
parent a26a195c35
commit b6f1a442fb
4 changed files with 11 additions and 5 deletions
@@ -75,7 +75,7 @@ class FirAnalyzerFacade(
fun runCheckers(): Map<FirFile, List<FirDiagnostic<*>>> {
if (_scopeSession == null) runResolution()
if (collectedDiagnostics != null) return collectedDiagnostics!!
val collector = FirDiagnosticsCollector.create(session)
val collector = FirDiagnosticsCollector.create(session, scopeSession)
collectedDiagnostics = buildMap {
for (file in firFiles!!) {
put(file, collector.collectDiagnostics(file))