FIR: substitute super type during tower building properly #KT-49301 Fixed

This commit is contained in:
Mikhail Glukhikh
2021-10-18 19:21:02 +03:00
parent b76e61cbc5
commit 7fc19520a5
6 changed files with 125 additions and 1 deletions
@@ -63,7 +63,7 @@ fun SessionHolder.collectTowerDataElementsForClass(owner: FirClass, defaultType:
allImplicitCompanionValues.addIfNotNull(companionReceiver)
val superClassesStaticsAndCompanionReceivers = mutableListOf<FirTowerDataElement>()
for (superType in lookupSuperTypes(owner, lookupInterfaces = false, deep = true, useSiteSession = session)) {
for (superType in lookupSuperTypes(owner, lookupInterfaces = false, deep = true, useSiteSession = session, substituteTypes = true)) {
val expandedType = superType.fullyExpandedType(session)
val superClass = expandedType.lookupTag.toSymbol(session)?.fir as? FirRegularClass ?: continue