Skip to content

Commit 633a9a3

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Wirtz <dcode@dcode.io>
1 parent 2ed0693 commit 633a9a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6027,7 +6027,7 @@ export class Compiler extends DiagnosticEmitter {
60276027
this.currentType = tee ? global.type : Type.void;
60286028
return module.unreachable();
60296029
}
6030-
return this.makeGlobalAssignment(global, valueExpr, global.type, tee);
6030+
return this.makeGlobalAssignment(global, valueExpr, valueType, tee);
60316031
}
60326032
case ElementKind.FIELD: {
60336033
let fieldInstance = <Field>target;
@@ -9164,7 +9164,8 @@ export class Compiler extends DiagnosticEmitter {
91649164
// return this
91659165
// }
91669166
var allocExpr = this.makeAllocation(classInstance);
9167-
if (classInstance.type.isManaged) allocExpr = this.makeRetain(allocExpr, classInstance.type);
9167+
let classType = classInstance.type;
9168+
if (classType.isManaged) allocExpr = this.makeRetain(allocExpr, classType);
91689169
stmts.push(
91699170
module.if(
91709171
module.unary(nativeSizeType == NativeType.I64 ? UnaryOp.EqzI64 : UnaryOp.EqzI32,

0 commit comments

Comments
 (0)