HaxeFoundation / HaxeFoundation/haxe

`Std.parseInt()` returns `0` for binary numbers prefixed with `0b`

Open
#12,858 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

This might be a breaking change but it's also inconsistent with base Haxe syntax.

```haxe
// Prints `true`
trace(Std.parseInt("0x12345678") == 0x12345678);
// Prints `false`
trace(Std.parseInt("0b10100010") == 0b10100010);
// Prints `0`
trace(Std.parseInt("0b10100010"));
```

https://try.haxe.org/#84b38882

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.