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

Fix some issues with new Dict constructors #8627

Merged
merged 1 commit into from
Oct 8, 2014
Merged

Conversation

simonster
Copy link
Member

  • If either the keys or values have the same type for all Pairs, use that type
  • Deprecations for removed constructors

Dict{K,V}(kv::((K,V)...,)) = Dict{K,V}(kv)
Dict{K }(kv::((K,Any)...,)) = Dict{K,Any}(kv)
Dict{V }(kv::((Any,V)...,)) = Dict{Any,V}(kv)
Dict (kv::((Any,Any)...,)) = Dict{Any,Any}(kv)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually covered by the generic Dict(kv).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Removed.

- If either the keys or values has the same type for all Pairs, use
  that type
- Deprecations for removed constructors
@simonster
Copy link
Member Author

I could also add a deprecation warning for the Dict{K,V}(ks,vs) inner constructor, but that deprecation would need to live in dict.jl.

JeffBezanson added a commit that referenced this pull request Oct 8, 2014
Fix some issues with new Dict constructors
@JeffBezanson JeffBezanson merged commit 7851a98 into master Oct 8, 2014
@simonster simonster deleted the sjk/dict-cleanup branch October 8, 2014 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants