We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7b9244 commit 37f27b1Copy full SHA for 37f27b1
src/compiler.ts
@@ -7871,16 +7871,14 @@ export class Compiler extends DiagnosticEmitter {
7871
// this.b = Y
7872
// return this
7873
// }
7874
+ var allocExpr = this.makeAllocation(classInstance);
7875
+ if (classInstance.type.isManaged) allocExpr = this.makeRetain(allocExpr);
7876
stmts.push(
7877
module.if(
7878
module.unary(nativeSizeType == NativeType.I64 ? UnaryOp.EqzI64 : UnaryOp.EqzI32,
7879
module.local_get(0, nativeSizeType)
7880
),
- module.local_set(0,
- this.makeRetain(
7881
- this.makeAllocation(classInstance)
7882
- )
7883
+ module.local_set(0, allocExpr)
7884
)
7885
);
7886
if (baseClass) {
0 commit comments