Unexpected negative interaction between subtypes and templates #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are now a couple places where the
numbersection has to provide identical implementations for the Pocomath typesnumberandNumInt. That's because if not, then eventually some generic template that's not right fornumbergets instantiated (on a bunch of types). It can't displace anumberimplementation, but there's no guard against creating aNumIntimplementation even though that type was properly handled by the previously existingnumberimplementation.This is a bug. It should not be necessary to repeat an implementation for subtypes to protect it from template override.
I think it ccould be fixed fairly easily with better checks in the template instantiation code. However, I am not going to work on that at the moment because the difficulty might become moot, depending on which parts of Pocomath are integrated into typed-function, and how.
Resolved by the
T:numbertemplates provided in #53.