FIR: set substituteTypes value explicitly in some lookupSupertypes calls
This commit is contained in:
+2
-1
@@ -218,7 +218,8 @@ object FirInlineClassDeclarationChecker : FirRegularClassChecker() {
|
||||
private fun FirRegularClass.isSubtypeOfCloneable(session: FirSession): Boolean {
|
||||
if (classId.isCloneableId()) return true
|
||||
|
||||
return lookupSuperTypes(this, lookupInterfaces = true, deep = true, session).any { superType ->
|
||||
return lookupSuperTypes(this, lookupInterfaces = true, deep = true, session, substituteTypes = false).any { superType ->
|
||||
// Note: We check just classId here, so type substitution isn't needed ^ (we aren't interested in type arguments)
|
||||
(superType as? ConeClassLikeType)?.fullyExpandedType(session)?.lookupTag?.classId?.isCloneableId() == true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,7 +237,8 @@ abstract class FirVisibilityChecker : FirSessionComponent {
|
||||
private fun FirClass.isSubClass(ownerLookupTag: ConeClassLikeLookupTag, session: FirSession): Boolean {
|
||||
if (classId.isSame(ownerLookupTag.classId)) return true
|
||||
|
||||
return lookupSuperTypes(this, lookupInterfaces = true, deep = true, session).any { superType ->
|
||||
return lookupSuperTypes(this, lookupInterfaces = true, deep = true, session, substituteTypes = false).any { superType ->
|
||||
// Note: We check just classId here, so type substitution isn't needed ^ (we aren't interested in type arguments)
|
||||
(superType as? ConeClassLikeType)?.fullyExpandedType(session)?.lookupTag?.classId?.isSame(ownerLookupTag.classId) == true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,8 @@ private fun FirRegularClass.getSingleAbstractMethodOrNull(
|
||||
|
||||
private fun FirRegularClass.computeSamCandidateNames(session: FirSession): Set<Name> {
|
||||
val classes =
|
||||
lookupSuperTypes(this, lookupInterfaces = true, deep = true, useSiteSession = session)
|
||||
// Note: we search only for names in this function, so substitution is not needed V
|
||||
lookupSuperTypes(this, lookupInterfaces = true, deep = true, useSiteSession = session, substituteTypes = false)
|
||||
.mapNotNullTo(mutableListOf(this)) {
|
||||
(session.symbolProvider.getSymbolByLookupTag(it.lookupTag) as? FirRegularClassSymbol)?.fir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user