[LL FIR] KtFirReferenceShortener: add order for FirScriptDeclarationsScope

It is similar mostly to FirClassUseSiteMemberScope or NestedClassifier

^KT-65344
This commit is contained in:
Dmitrii Gridin
2024-02-05 20:45:51 +01:00
committed by Space Team
parent 18978ca3f1
commit ca484fae2c
2 changed files with 3 additions and 0 deletions
@@ -709,6 +709,7 @@ private class ElementsToShortenCollector(
val scopeDistanceLevel: Int // Note: Don't use the built-in ordinal since there are some scopes that are at the same level.
) {
Local(1),
ScriptDeclarations(2),
ClassUseSite(2),
NestedClassifier(2),
TypeParameter(2),
@@ -721,6 +722,7 @@ private class ElementsToShortenCollector(
fun FirScope.toPartialOrder(): PartialOrderOfScope {
return when (this) {
is FirLocalScope -> Local
is FirScriptDeclarationsScope -> ScriptDeclarations
is FirClassUseSiteMemberScope -> ClassUseSite
is FirNestedClassifierScope -> NestedClassifier
is FirTypeParameterScope -> TypeParameter
@@ -3,6 +3,7 @@ with default settings:
[qualifier] one.A
with DO_NOT_SHORTEN:
with SHORTEN_IF_ALREADY_IMPORTED:
[qualifier] one.A
with SHORTEN_AND_IMPORT:
[qualifier] one.A
with SHORTEN_AND_STAR_IMPORT: