HaxeFoundation / HaxeFoundation/hxcpp

Int64 loses type within the array.

Open
#1,227 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Int64 loses its value within the array, which causes serious problems in an implementation like the one below.

https://github.com/barisyild/hxvm-lua/blob/116f62154c21b6dc9f6cebd51e21d32612fd2d80/src/vm/lua/Lua.hx#L190

```haxe
var args:Array = [];
args.push(haxe.Int64.parseString("9138745278763343734"));
args.push(0.24332);

if(args[0] != haxe.Int64.parseString("9138745278763343734"))
throw "Error: args[0] != 9138745278763343734 " + args[0];

trace("PASS!");
```
```ex
Error: args[1] != haxe.Int64.parseString("9138745278763343734") 9.13874527876334e+18
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.