[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
@@ -203,6 +203,12 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return this.projectionKind.convertVariance()
}
override fun TypeArgumentMarker.replaceType(newType: KotlinTypeMarker): TypeArgumentMarker {
require(this is TypeProjection, this::errorMessage)
require(newType is KotlinType, this::errorMessage)
return this.replaceType(newType)
}
override fun TypeArgumentMarker.getType(): KotlinTypeMarker {
require(this is TypeProjection, this::errorMessage)
return this.type.unwrap()