Skip to content

Commit e82e45f

Browse files
committed
fix
1 parent 1f042c6 commit e82e45f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10028,10 +10028,10 @@ export class Compiler extends DiagnosticEmitter {
1002810028

1002910029
/** Check if possible to optimize the active initialization away if it's zero */
1003010030
canOptimizeZeroInitialization(valueExpr: ExpressionRef): bool {
10031-
if ((this.options.runtime != Runtime.Incremental) && (this.options.runtime != Runtime.Stub)) {
10032-
return false;
10033-
}
10034-
return isConstZero(valueExpr);
10031+
const runtime = this.options.runtime;
10032+
return (runtime == Runtime.Incremental || runtime == Runtime.Stub)
10033+
? isConstZero(valueExpr)
10034+
: false;
1003510035
}
1003610036

1003710037
/** Makes a constant zero of the specified type. */

0 commit comments

Comments
 (0)