-
-
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
Multiple dispatch issue with optional parameters #21481
Comments
In 0.6, Other than that, this is #7357. |
and yes, Jeff beats me at finding #7357.... |
close as duplicate. also #265 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In investigating what appeared to be a code coverage issue with CSV.jl, @omus and I stumbled upon an unusual dispatch issue. It can be summarized like this:
As @omus has pointed out, the issue is that this:
is lowered to:
and since
foo{T}(x::T)
is deemed more specific thanfoo(x)
,foo{T}(x::T)
is called instead offoo(x)
.It seems like a warning might be appropriate in this case.
In the above example, I get the same behaviour on both 0.5 and 0.6, using these versions:
However, I get different behaviour depending on whether I call
foo()
in between the definitions.In 0.5:
In 0.6:
The text was updated successfully, but these errors were encountered: