Skip to content
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

Dispatch on Pair #19159

Closed
jw3126 opened this issue Oct 30, 2016 · 2 comments
Closed

Dispatch on Pair #19159

jw3126 opened this issue Oct 30, 2016 · 2 comments
Labels
types and dispatch Types, subtyping and method dispatch

Comments

@jw3126
Copy link
Contributor

jw3126 commented Oct 30, 2016

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-dev.975 (2016-10-24 19:00 UTC)
 _/ |\__'_|_|_|\__'_|  |  scan/0929f08* (fork: 5 commits, 16 days)
|__/                   |  x86_64-linux-gnu

julia> f{K}(::Pair{K}) = 1
f (generic function with 1 method)

julia> f{K, V}(::Pair{K, V}) = 2
f (generic function with 2 methods)

julia> f("a"=>123)
1
@tkelman tkelman added the types and dispatch Types, subtyping and method dispatch label Oct 30, 2016
@JeffBezanson
Copy link
Member

I can already confirm this will be fixed by #8974, after which the two signatures are type-equal and the second definition overwrites the first (with usual warning).

@JeffBezanson
Copy link
Member

Dup of #18892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

3 participants