Skip to content

Commit 3ec6fce

Browse files
committed
Merge pull request asm-js#96 from soliton4/ifTypeIssue
if type check issue
2 parents 4f6e777 + acde4a4 commit 3ec6fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Vp.checkArguments = function checkArguments(ts, expected, msg, locs, loc) {
718718

719719
// (Expression, Statement, Statement | null) -> void
720720
Vp.ifStatement = function ifStatement(test, cons, alt) {
721-
this.checkSubtype(this.expression(test), types.boolish, "if test", test.loc);
721+
this.checkSubtype(this.expression(test), ty.Int, "if test", test.loc);
722722
this.statement(cons);
723723
if (alt)
724724
this.statement(alt);

0 commit comments

Comments
 (0)