JS_IR fix erasedUpperBound for DNN types

This commit is contained in:
Dmitry Petrov
2022-02-14 17:40:49 +03:00
committed by Space
parent 7952e8b28f
commit 4802061b87
@@ -33,8 +33,12 @@ private val IrTypeParameter.erasedUpperBound: IrClass?
}
val IrType.erasedUpperBound: IrClass?
get() = when (val classifier = classifierOrNull) {
is IrClassSymbol -> classifier.owner
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
else -> throw IllegalStateException()
}
get() =
if (this is IrDefinitelyNotNullType)
this.original.erasedUpperBound
else
when (val classifier = classifierOrNull) {
is IrClassSymbol -> classifier.owner
is IrTypeParameterSymbol -> classifier.owner.erasedUpperBound
else -> throw IllegalStateException()
}