mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:08:11 +00:00
LibJS: Don't parse numeric literal containing 8 or 9 as octal
If the value has a leading zero (allowed in non-strict mode) but contains the digits 8 or 9 it can't be an octal number.
This commit is contained in:
parent
b4e51249e9
commit
b5bd05b717
2 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,7 @@ test("octal literals", () => {
|
|||
expect(0o10).toBe(8);
|
||||
expect(0o10).toBe(8);
|
||||
expect(010).toBe(8);
|
||||
expect(089).toBe(89);
|
||||
});
|
||||
|
||||
test("binary literals", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue