[JS IR] Erase IrErrorType into IrErrorType
This commit is contained in:
committed by
TeamCityServer
parent
002d6723ac
commit
dc1155de24
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.ir.util.defaultType
|
|||||||
|
|
||||||
fun IrType.eraseGenerics(irBuiltIns: IrBuiltIns): IrType {
|
fun IrType.eraseGenerics(irBuiltIns: IrBuiltIns): IrType {
|
||||||
if (this is IrDynamicType) return this
|
if (this is IrDynamicType) return this
|
||||||
|
if (this is IrErrorType) return this
|
||||||
val defaultType = this.erasedUpperBound?.defaultType ?: irBuiltIns.anyType
|
val defaultType = this.erasedUpperBound?.defaultType ?: irBuiltIns.anyType
|
||||||
if (!this.isNullable()) return defaultType
|
if (!this.isNullable()) return defaultType
|
||||||
return defaultType.makeNullable()
|
return defaultType.makeNullable()
|
||||||
|
|||||||
Reference in New Issue
Block a user