haxe icon indicating copy to clipboard operation
haxe copied to clipboard

[hl] anons_cache might be a bad idea

Open Simn opened this issue 1 year ago • 0 comments

mutable anons_cache : (tanon, ttype) PMap.t;

This puts a lot of faith in OCaml's compare. It can easily go tanon -> tclass_field -> Type.t -> TInst -> tclass and then who knows what might happen. I'm actually surprised that we're not seeing any tangible issues from this. Am I missing something or should a complex value like tanon not be used as a map key?

Simn avatar Jan 08 '24 11:01 Simn