Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php, python] big int issue #42

Open
andyli opened this issue Dec 7, 2015 · 5 comments
Open

[php, python] big int issue #42

andyli opened this issue Dec 7, 2015 · 5 comments

Comments

@andyli
Copy link
Member

andyli commented Dec 7, 2015

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'
@ncannasse
Copy link
Member

It comes from there https://github.com/HaxeFoundation/hscript/blob/master/hscript/Parser.hx#L980-L989, any idea how to fix this @Simn ?

@Simn
Copy link
Member

Simn commented Dec 20, 2015

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

@ncannasse
Copy link
Member

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

@Simn
Copy link
Member

Simn commented Dec 20, 2015

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.

@ncannasse
Copy link
Member

Maybe doing & 0xFFFFFFFF on these platforms would work ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants