Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix coercing integral types

  • Loading branch information...
commit 0d90babe3cdbc1e614a2b88639030d8f8a376d4d 1 parent 6df6d22
@syg syg authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/compiler.js
View
8 src/compiler.js
@@ -1021,7 +1021,6 @@
var right = new UnaryExpression("&", this.right, this.right.loc);
return cast(new CallExpression(mc, [left, right, literal(size)]), lty, this.loc).transform(o);
} else {
-
this.right = cast(this.right, lty);
return cast(this, lty);
@@ -1147,11 +1146,10 @@
return expr;
}
- if (rty && rty.numeric) {
- return expr;
- }
-
if (!this.integral) {
+ if (rty && rty.numeric) {
+ return expr;
+ }
return new CallExpression(new Identifier("Number"), [expr], expr.loc);
}
Please sign in to comment.
Something went wrong with that request. Please try again.