[FIR] pre-resolve some scope callables before creating a scope
In a lot of cases, when we want to process the declaration in scope, it should be resolved to at least TYPES phase. To avoid doing it manually in all our variety of scopes, we do it when the scope it created. It was implicitly working manually before as lazy resolve did a lot of extra work on resolving a declaration it was not supposed to resolve. Now it's not the case, and we have to explicitly resolve all the declarations we need. ^KT-56543 Co-authored-by: Ilya Kirillov <ilya.kirillov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
23e40693a3
commit
706ff6b61f
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -84,7 +84,7 @@ class FirScopeDumpHandler(testServices: TestServices) : FirAnalysisHandler(testS
|
||||
println("$fqName: ")
|
||||
|
||||
session.lazyDeclarationResolver.disableLazyResolveContractChecksInside {
|
||||
val scope = firClass.unsubstitutedScope(session, scopeSession, withForcedTypeCalculator = true)
|
||||
val scope = firClass.unsubstitutedScope(session, scopeSession, withForcedTypeCalculator = true, memberRequiredPhase = null)
|
||||
val names = namesFromDirective.takeIf { it.isNotEmpty() }?.map { Name.identifier(it) } ?: scope.getCallableNames()
|
||||
withIndent {
|
||||
for (name in names) {
|
||||
|
||||
Reference in New Issue
Block a user