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

Support one and oneunit #59

Merged
merged 2 commits into from
Dec 1, 2017
Merged

Support one and oneunit #59

merged 2 commits into from
Dec 1, 2017

Conversation

omus
Copy link
Member

@omus omus commented Nov 29, 2017

No description provided.

@@ -95,8 +95,9 @@ for f in (:(!), :(+), :(-), :(Base.identity), :(Base.zero),
@eval $(f)(d::Missing) = missing
end

Base.zero(::Type{Union{T, Missing}}) where {T <: Number} = zero(T)
Copy link
Member

Choose a reason for hiding this comment

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

The type restriction was there on purpose. See #44, and the workaround by defining zero(::Type{Any}) here (but this would be type piracy in this package).

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. I think I found a nice way to work around the type piracy problem.

@codecov-io
Copy link

Codecov Report

Merging #59 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   94.03%   94.07%   +0.03%     
==========================================
  Files           1        1              
  Lines         151      152       +1     
==========================================
+ Hits          142      143       +1     
  Misses          9        9
Impacted Files Coverage Δ
src/Missings.jl 94.07% <100%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4287e00...6477256. Read the comment docs.

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

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

Cool. Feel free to push the same changes to my Julia PR.

@omus
Copy link
Member Author

omus commented Nov 30, 2017

Feel free to push the same changes to my Julia PR.

Will update JuliaLang/julia#24653

@omus
Copy link
Member Author

omus commented Dec 1, 2017

I believe this is ready to merge. Any other comments?

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.

5 participants