Skip to content

Int64 loses type within the array. #1227

@barisyild

Description

@barisyild

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

var args:Array<Any> = [];
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!");
Error: args[1] != haxe.Int64.parseString("9138745278763343734") 9.13874527876334e+18

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