[LL FIR] KtFirReferenceShortener: add order for FirScriptDeclarationsScope
It is similar mostly to FirClassUseSiteMemberScope or NestedClassifier ^KT-65344
This commit is contained in:
committed by
Space Team
parent
18978ca3f1
commit
ca484fae2c
+2
@@ -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.
|
val scopeDistanceLevel: Int // Note: Don't use the built-in ordinal since there are some scopes that are at the same level.
|
||||||
) {
|
) {
|
||||||
Local(1),
|
Local(1),
|
||||||
|
ScriptDeclarations(2),
|
||||||
ClassUseSite(2),
|
ClassUseSite(2),
|
||||||
NestedClassifier(2),
|
NestedClassifier(2),
|
||||||
TypeParameter(2),
|
TypeParameter(2),
|
||||||
@@ -721,6 +722,7 @@ private class ElementsToShortenCollector(
|
|||||||
fun FirScope.toPartialOrder(): PartialOrderOfScope {
|
fun FirScope.toPartialOrder(): PartialOrderOfScope {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is FirLocalScope -> Local
|
is FirLocalScope -> Local
|
||||||
|
is FirScriptDeclarationsScope -> ScriptDeclarations
|
||||||
is FirClassUseSiteMemberScope -> ClassUseSite
|
is FirClassUseSiteMemberScope -> ClassUseSite
|
||||||
is FirNestedClassifierScope -> NestedClassifier
|
is FirNestedClassifierScope -> NestedClassifier
|
||||||
is FirTypeParameterScope -> TypeParameter
|
is FirTypeParameterScope -> TypeParameter
|
||||||
|
|||||||
+1
@@ -3,6 +3,7 @@ with default settings:
|
|||||||
[qualifier] one.A
|
[qualifier] one.A
|
||||||
with DO_NOT_SHORTEN:
|
with DO_NOT_SHORTEN:
|
||||||
with SHORTEN_IF_ALREADY_IMPORTED:
|
with SHORTEN_IF_ALREADY_IMPORTED:
|
||||||
|
[qualifier] one.A
|
||||||
with SHORTEN_AND_IMPORT:
|
with SHORTEN_AND_IMPORT:
|
||||||
[qualifier] one.A
|
[qualifier] one.A
|
||||||
with SHORTEN_AND_STAR_IMPORT:
|
with SHORTEN_AND_STAR_IMPORT:
|
||||||
|
|||||||
Reference in New Issue
Block a user