Build recursive raw types and raw types which contain type parameters properly

1) Substitute erasure of other type parameters
2) Use star projection at top level for recursive raw types

^KT-46126 Fixed
This commit is contained in:
Victor Petukhov
2021-04-19 23:12:10 +03:00
parent f9d2ca68ce
commit 8dd71ec5c8
35 changed files with 606 additions and 41 deletions
@@ -183,7 +183,7 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
return false
}
override fun TypeParameterMarker.doesFormSelfType(selfConstructor: TypeConstructorMarker): Boolean {
override fun TypeParameterMarker.hasRecursiveBounds(selfConstructor: TypeConstructorMarker): Boolean {
for (i in 0 until this.upperBoundCount()) {
val upperBound = this.getUpperBound(i)
if (upperBound.containsTypeConstructor(selfConstructor) && upperBound.typeConstructor() == selfConstructor) {