[FE] Add missing 'lazyResolveToPhase()' before recursive bound check

^KTIJ-24087 Fixed
This commit is contained in:
Yan Zhulanow
2022-12-26 21:55:29 +09:00
committed by Space Team
parent 322a8a443b
commit 699f96284a
5 changed files with 162 additions and 0 deletions
@@ -338,6 +338,7 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
override fun TypeParameterMarker.hasRecursiveBounds(selfConstructor: TypeConstructorMarker?): Boolean {
require(this is ConeTypeParameterLookupTag)
this.typeParameterSymbol.lazyResolveToPhase(FirResolvePhase.TYPES)
return this.bounds().any { typeRef ->
typeRef.coneType.contains { it.typeConstructor() == this.getTypeConstructor() }
&& (selfConstructor == null || typeRef.coneType.typeConstructor() == selfConstructor)