[FE 1.0] Create captured star projection for self types by replacing type arguments deeply

^KT-49752 Fixed
This commit is contained in:
Victor Petukhov
2021-11-19 14:42:41 +03:00
parent 6474a90555
commit 61d40403e7
12 changed files with 139 additions and 2 deletions
@@ -131,6 +131,9 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
override fun TypeArgumentMarker.getVariance(): TypeVariance =
(this as? IrTypeProjection)?.variance?.convertVariance() ?: TypeVariance.OUT
override fun TypeArgumentMarker.replaceType(newType: KotlinTypeMarker): TypeArgumentMarker =
IrTypeProjectionImpl(newType as IrType, (this as IrTypeProjection).variance)
override fun TypeArgumentMarker.getType() = (this as IrTypeProjection).type
private fun getTypeParameters(typeConstructor: TypeConstructorMarker): List<IrTypeParameter> {