Open wldhx opened 8 years ago
Overriding a single implementation is not yet possible. However, you can redeclare f
in its entirety when using the @overloaded
/ @overloads(...)
syntax. Simply use @overloaded
on the first variant, and a new dispatcher is created that starts out with a clean slate.
Let's keep the issue open because there are ways in which the current situation could be improved:
@overloaded
and then use @overload
thereafter instead of @overloads(...)
.
That's mostly relevant for interactive usecases such as REPL or a Jupyter Notebook.
Suppose I have a function
and at some point (in an interactive session, with ^ already declared), want to change it, to, for i.,
This would fail as of
overloading==0.5.0
withOverloadingError: Failed to overload function 'f': non-unique signature
. Can I somehow force an override?