close
Skip to content

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

@EliteMasterEric

Description

@EliteMasterEric

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

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions