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

Resolve remaining method ambiguities #626

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

sostock
Copy link
Collaborator

@sostock sostock commented Mar 11, 2023

On Julia ≥1.1, this resolves all method ambiguities (edit: all method ambiguities that are found by Aqua or Test.detect_ambiguities. #469 is still broken). On Julia 1.0, there are 5 ambiguities remaining.

Closes #604.

Edit 2: this PR now resolves #469 as well.

Comment on lines -280 to -282
function Base.promote_rule(::Type{Level{L,R,S}}, ::Type{Quantity{T,D,U}}) where {L,R,S,T,D,U}
return promote_type(S, Quantity{T,D,U})
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this method does not resolve ambiguities. I just removed it because it isn’t necessary.

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2023

Codecov Report

Merging #626 (c7a71b4) into master (7abc54c) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head c7a71b4 differs from pull request most recent head a8c3e12. Consider uploading reports for the commit a8c3e12 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #626      +/-   ##
==========================================
+ Coverage   89.03%   89.07%   +0.04%     
==========================================
  Files          16       16              
  Lines        1495     1492       -3     
==========================================
- Hits         1331     1329       -2     
+ Misses        164      163       -1     
Impacted Files Coverage Δ
src/logarithm.jl 77.91% <ø> (-0.37%) ⬇️
src/promotion.jl 95.55% <100.00%> (ø)
src/quantities.jl 94.30% <100.00%> (+0.04%) ⬆️
src/types.jl 96.00% <100.00%> (+1.88%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sostock sostock merged commit d032414 into PainterQubits:master Mar 21, 2023
@sostock sostock deleted the resolve_ambiguities branch March 21, 2023 11:19
@sostock sostock mentioned this pull request Mar 23, 2023
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.

Fix method ambiguities floor with degrees (NoUnits) and digits fails due to method ambiguity
2 participants