K2: use lookupTag instead of classId in use-site scopes
We used this classId to get an associated symbol, but this way is anyway not recommended (e.g. problems with local classes). In this commit we migrated to usage of lookup tags instead.
This commit is contained in:
committed by
Space Team
parent
79e041a310
commit
2f29738989
+1
-1
@@ -617,7 +617,7 @@ private class ElementsToShortenCollector(
|
||||
private fun FirScope.correspondingClassIdIfExists(): ClassId = when (this) {
|
||||
is FirNestedClassifierScope -> klass.classId
|
||||
is FirNestedClassifierScopeWithSubstitution -> originalScope.correspondingClassIdIfExists()
|
||||
is FirClassUseSiteMemberScope -> classId
|
||||
is FirClassUseSiteMemberScope -> ownerClassLookupTag.classId
|
||||
else -> errorWithAttachment("FirScope ${this::class}` is expected to be one of FirNestedClassifierScope and FirClassUseSiteMemberScope to get ClassId") {
|
||||
withEntry("firScope", this@correspondingClassIdIfExists) { it.toString() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user