[IR] Use deepCopyWithSymbols in IrTypeOperatorCall
This commit is contained in:
committed by
TeamCityServer
parent
7046f9badd
commit
084d824984
+6
-2
@@ -269,8 +269,12 @@ class TypeOperatorLowering(val context: JsIrBackendContext) : BodyLoweringPass {
|
||||
// assert(!typeParameter.isReified) { "reified parameters have to be lowered before" }
|
||||
|
||||
return typeParameter.superTypes.fold<IrType, IrExpression?>(null) { r, t ->
|
||||
require(argument is IrExpressionWithCopy) { "Not a copyable expression: ${argument.render()}" }
|
||||
val check = generateTypeCheckNonNull(argument.copy(), t.makeNotNull())
|
||||
val copy = if (argument is IrExpressionWithCopy) {
|
||||
argument.copy()
|
||||
} else {
|
||||
argument.deepCopyWithSymbols()
|
||||
}
|
||||
val check = generateTypeCheckNonNull(copy, t.makeNotNull())
|
||||
|
||||
if (r == null) {
|
||||
check
|
||||
|
||||
Reference in New Issue
Block a user