hashlink icon indicating copy to clipboard operation
hashlink copied to clipboard

Maps can't use some keys types (Int64, Float, Bool...) since the new Haxe 4.3.0 version

Open tfabretti opened this issue 1 year ago • 3 comments

Trying to create maps with some types as key gives an error : Abstract haxe.ds.Map has no @:to function that accepts haxe.IMap<haxe.Int64, Int> I realized it with the Int64 type but then, I've been talking about this on the Heaps Discord and Yanrishatum (<3) found out it also applied to Float or Bool. Their theory is that it's linked to @:runtimeValue. Here are some examples : https://try.haxe.org/#18552329.

tfabretti avatar Apr 18 '23 21:04 tfabretti

I think that's more an Haxe issue than an Hashlink one. We did change Int64 to be a native type but we haven't yet introduced a 64 bit Map in Haxe for all platforms.

ncannasse avatar Apr 18 '23 21:04 ncannasse

I'm not sure if and how these used to work, but that was more by accident than by design :)

ncannasse avatar Apr 18 '23 21:04 ncannasse

Oh, I see. As it worked in JS, I thought it was a HL issue. My bad. Should I open an issue on the Haxe git ? It used to work in a broken way. The Int64 was an Object so it was comparing reference and not value.

tfabretti avatar Apr 18 '23 21:04 tfabretti