higgsjs / Higgs

Higgs JavaScript Virtual Machine
875 stars 62 forks source link

Add toHash method for struct runtime/object/ValType #217

Closed RazvanN7 closed 5 years ago

RazvanN7 commented 5 years ago

This is currently blocking [1]. In dmd, if you define use a struct as a key for an associative array and you define opEquals you have to define toHash also; before [1], due to a compiler bug regarding anonymous unions the compiler generated a builtin toHash method for ValType, now it no longer does that causing an error. This patch explicitly adds the builtin toHash method for structs to ValType.

After this is merged, please push a new tag so buildkite can pick it up and test against the latest version. Thanks!

[1] https://github.com/dlang/dmd/pull/9909