[FE] Add isLocal name to ClassId constructor calls where it needed
This commit is contained in:
committed by
Space Team
parent
adaf8ae46a
commit
9e5ee3afa0
+1
-1
@@ -567,7 +567,7 @@ internal val ClassifierDescriptor.classId: ClassId?
|
||||
}
|
||||
|
||||
internal val ClassifierDescriptor.maybeLocalClassId: ClassId
|
||||
get() = classId ?: ClassId(containingPackage() ?: FqName.ROOT, FqName.topLevel(this.name), true)
|
||||
get() = classId ?: ClassId(containingPackage() ?: FqName.ROOT, FqName.topLevel(this.name), isLocal = true)
|
||||
|
||||
internal fun ClassDescriptor.getSupertypesWithAny(): Collection<KotlinType> {
|
||||
val supertypes = typeConstructor.supertypes
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class KtFe10DescFunctionLikeSymbolPointer<T : KtFunctionLikeSymbol>(
|
||||
|
||||
val className = callableId.className
|
||||
val memberScope = if (className != null) {
|
||||
val outerClassId = ClassId(callableId.packageName, className, false)
|
||||
val outerClassId = ClassId(callableId.packageName, className, isLocal = false)
|
||||
analysisContext.resolveSession.moduleDescriptor.findClassAcrossModuleDependencies(outerClassId)
|
||||
?.unsubstitutedMemberScope
|
||||
?: MemberScope.Empty
|
||||
|
||||
+2
-2
@@ -296,9 +296,9 @@ private sealed class FqNameInterpretation {
|
||||
|
||||
return when {
|
||||
classParts.isEmpty() && callable == null -> FqNameInterpretationAsPackage(packageName)
|
||||
callable == null -> FqNameInterpretationAsClassId(ClassId(packageName, relativeClassName, false))
|
||||
callable == null -> FqNameInterpretationAsClassId(ClassId(packageName, relativeClassName, isLocal = false))
|
||||
else -> FqNameInterpretationAsCallableId(CallableId(packageName, relativeClassName.takeUnless { it.isRoot }, callable))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ public val PsiClass.classIdIfNonLocal: ClassId?
|
||||
val relatedClassName = qualifiedName.removePrefix("$packageName.")
|
||||
if (relatedClassName.isEmpty()) return null
|
||||
|
||||
return ClassId(FqName(packageName), FqName(relatedClassName), false)
|
||||
return ClassId(FqName(packageName), FqName(relatedClassName), isLocal = false)
|
||||
}
|
||||
|
||||
+2
-2
@@ -101,7 +101,7 @@ internal class StubBasedFirDeserializationContext(
|
||||
)
|
||||
|
||||
val memberDeserializer: StubBasedFirMemberDeserializer = StubBasedFirMemberDeserializer(this, initialOrigin)
|
||||
val dispatchReceiver = relativeClassName?.let { ClassId(packageFqName, it, /* local = */ false).defaultType(allTypeParameters) }
|
||||
val dispatchReceiver = relativeClassName?.let { ClassId(packageFqName, it, isLocal = false).defaultType(allTypeParameters) }
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -513,7 +513,7 @@ internal class StubBasedFirMemberDeserializer(
|
||||
dispatchReceiverType =
|
||||
if (!isInner) null
|
||||
else with(c) {
|
||||
ClassId(packageFqName, relativeClassName.parent(), false).defaultType(outerTypeParameters)
|
||||
ClassId(packageFqName, relativeClassName.parent(), isLocal = false).defaultType(outerTypeParameters)
|
||||
}
|
||||
resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES
|
||||
this.typeParameters +=
|
||||
|
||||
+2
-2
@@ -308,6 +308,6 @@ internal fun KtUserType.classId(): ClassId {
|
||||
return ClassId(
|
||||
FqName.fromSegments(packageFragments),
|
||||
FqName.fromSegments(classFragments),
|
||||
/* local = */ false
|
||||
isLocal = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ class SymbolKotlinAsJavaSupport(project: Project) : KotlinAsJavaSupportBase<KtMo
|
||||
|
||||
return sequence {
|
||||
while (true) {
|
||||
yield(ClassId(currentParent, FqName(currentRelativeName), false))
|
||||
yield(ClassId(currentParent, FqName(currentRelativeName), isLocal = false))
|
||||
currentName = currentParent.shortNameOrSpecial()
|
||||
if (currentName.isSpecial) break
|
||||
currentParent = currentParent.parentOrNull() ?: break
|
||||
|
||||
Reference in New Issue
Block a user