diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/TypeTranformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/TypeTranformer.kt index 2d783d918bd..c40f027e144 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/TypeTranformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/utils/TypeTranformer.kt @@ -15,6 +15,7 @@ import org.jetbrains.kotlin.ir.util.defaultType fun IrType.eraseGenerics(irBuiltIns: IrBuiltIns): IrType { if (this is IrDynamicType) return this + if (this is IrErrorType) return this val defaultType = this.erasedUpperBound?.defaultType ?: irBuiltIns.anyType if (!this.isNullable()) return defaultType return defaultType.makeNullable()