[FIR] Add missing ensureResolved to FirClassSubstitutionScope
`createNewTypeParametersAndSubstitutor` call might need resolved types to be able to work correctly with the generics' type bounds
This commit is contained in:
committed by
TeamCityServer
parent
534beb8553
commit
29bb8cea8f
+2
-1
@@ -255,6 +255,7 @@ class FirClassSubstitutionScope(
|
||||
)
|
||||
|
||||
private fun createSubstitutedData(member: FirCallableDeclaration): SubstitutedData {
|
||||
member.ensureResolved(FirResolvePhase.TYPES)
|
||||
val (newTypeParameters, substitutor) = FirFakeOverrideGenerator.createNewTypeParametersAndSubstitutor(
|
||||
session,
|
||||
member as FirTypeParameterRefsOwner,
|
||||
@@ -267,7 +268,7 @@ class FirClassSubstitutionScope(
|
||||
|
||||
val newDispatchReceiverType = dispatchReceiverTypeForSubstitutedMembers.substitute(substitutor)
|
||||
|
||||
member.symbol.ensureResolved(FirResolvePhase.STATUS)
|
||||
member.ensureResolved(FirResolvePhase.STATUS)
|
||||
val returnType = member.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
val fakeOverrideSubstitution = runIf(returnType == null) { FakeOverrideSubstitution(substitutor, member.symbol) }
|
||||
val newReturnType = returnType?.substitute(substitutor)
|
||||
|
||||
Reference in New Issue
Block a user