compat icon indicating copy to clipboard operation
compat copied to clipboard

Binary literal test is incorrect

Open ustun opened this issue 6 years ago • 0 comments

On the following line:

https://github.com/jgardella/compat/blob/master/src/js/features/es6/syntax/octalAndBinaryLiterals/binaryLiterals.js#L13

we check for binary literal by matching 'b' in the lowercase version of the number.

However, 0xb is a valid ES5 hexadecimal literal. We should not check for existence of b, but that b exists after the initial 0.

ustun avatar Jul 03 '19 07:07 ustun