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

Clarify the behavior of zero on Quantity types… #266

Merged
merged 1 commit into from
Sep 1, 2019

Conversation

ajkeller34
Copy link
Collaborator

… that are not fully specified. Closes #264.

  • zero(::Type{<:AbstractQuantity{T}}) where T should fail.
  • zero(::Type{<:AbstractQuantity{T,D}}) where {T,D} should use upreferred(D).

… specified. Closes PainterQubits#264.

- `zero(::Type{<:AbstractQuantity{T}}) where T` should fail.
- `zero(::Type{<:AbstractQuantity{T,D}}) where {T,D}` should use `upreferred(D)`.
@codecov-io
Copy link

codecov-io commented Sep 1, 2019

Codecov Report

Merging #266 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
+ Coverage   78.43%   78.47%   +0.04%     
==========================================
  Files          15       15              
  Lines        1071     1073       +2     
==========================================
+ Hits          840      842       +2     
  Misses        231      231
Impacted Files Coverage Δ
src/quantities.jl 91.48% <100%> (+0.09%) ⬆️

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 9a49e56...f4da250. Read the comment docs.

@ajkeller34 ajkeller34 merged commit a7de836 into PainterQubits:master Sep 1, 2019
@ajkeller34 ajkeller34 deleted the fixzero branch September 1, 2019 21:50
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.

zero(Quantity{Int64, D, U} where U where D) should error?
2 participants