Skip to content

[php, python] big int issue #42

Open

Description

@andyli

the following test in Test.hx failed when targeting php and python:

assertScript("0xBFFFFFFF", 0xBFFFFFFF);

The same error is returned by php and python:

ERR: Test.hx:16(Test.assertScript) - expected '-1073741825' but was '3221225471'

Activity

  1. ncannasse commented on Dec 20, 2015

    @ncannasse
    Member
  2. Simn commented on Dec 20, 2015

    @Simn
    Member

    Does it work if the Haxe 2 version with Int32 is used?

  3. ncannasse commented on Dec 20, 2015

    @ncannasse
    Member

    I'm not sure, we didn't unit test it on PHP/Python at this time I think

  4. Simn commented on Dec 20, 2015

    @Simn
    Member

    Just tested, it parses the correct value when using Int32, but with CInt taking an Int argument that doesn't help much. Even when changing that to Int32 it doesn't make it through the interpreter though, presumably because expr just assigns it to Dynamic when returning.

  5. ncannasse commented on Dec 20, 2015

    @ncannasse
    Member

    Maybe doing & 0xFFFFFFFF on these platforms would work ?

  6. added a commit that references this issue on May 6, 2017
    8b9b244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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