-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
.. this comes from investingating issues with Complex Integer.
Start with a domain like:
Complex(T: ..): with {
*: (T, %) -> %
*: (I, %) -> %
}
Now inherit these definitions...
extend Complex(T: ...) with {
f: (T, %) -> %
} == add {
f(t: T, x: %): % == t * x;
}
All good so far.
f$Complex I
Now call f. If the compiler has chosen to inline "_" in the definition of f, it hopes to get the first definition of _. Unfortunately, both definitions of "*" have the same hash code in the case of Complex I, and if we get the second, mayhem will result.
For a real example, see the initial version of reciprocal in sal_complex.as.
Metadata
Metadata
Assignees
Labels
No labels