Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Unnecessary cast #362

Closed
mhevery opened this issue Apr 7, 2016 · 1 comment
Closed

Unnecessary cast #362

mhevery opened this issue Apr 7, 2016 · 1 comment

Comments

@mhevery
Copy link

mhevery commented Apr 7, 2016

Given:

0x22 | 0xF0

Expected:

0x22 | 0xF0

Actual:

(0x22 as int) | (0xF0 as int)

The reason we add casting is because it is required in this case

var a = 0x22;
var b = 0xF0;
a | b

because Typescript makes a and b a number, which does need to be down casted to an int.

@mhevery mhevery assigned evmar and mprobst and unassigned evmar Apr 7, 2016
@mprobst
Copy link
Contributor

mprobst commented Apr 11, 2016

Fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants