refu
refu copied to clipboard
Type operator associativity
Many of the type operators should have the associative property.
As an example the sum type:
string | i32
is the same as i32 | string
and yet the current implementation does not view it as such.
I suppose same goes for product types:
string, i32, bool
should be equal or at least convertible (with a warning since memory layout changes?) to any other permutation like: i32, bool, string
.