-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of invoke with parametric types #22554
Comments
Yes, this capability is missing. There are still some code paths left that assume the type to look up is a direct |
Is there a general way to ask something like "which method would have been invoked, given these arguments, if this method didn't exist?" |
As it happens, I was trying to do exactly that when I ran into the above issue. I haven't found a solution that doesn't involve writing some code to examine the method table to determine which method is the next most specific, and then using |
fixes JuliaLang#25341, fixes JuliaLang#24460, fixes JuliaLang#22554
Suppose I have a function
foo
with methods whose signatures areand I wish to invoke the 2nd method from within the 1st. In this case we could define the first method as follows to achieve the desired behaviour:
Now suppose we had instead defined methods with the following signatures:
The seemingly natural thing to do is to
invoke
using the appropriateUnionAll
:However, this doesn't appear to work, yielding the following error:
Tested on both
and
to make sure I hadn't missed a change.
The text was updated successfully, but these errors were encountered: