Skip to content

Type-inference improvement in reduce over Ones #291

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Aug 22, 2023

This makes the following concretely type-inferred:

julia> @inferred sum([Ones(4)])
4-element Fill{Float64}, with entries equal to 1.0

Without this, the return type is inferred to be a Union{Ones, Fill}

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #291 (8ffaf5e) into master (a718e2f) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #291   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files           5        5           
  Lines         869      872    +3     
=======================================
+ Hits          868      871    +3     
  Misses          1        1           
Files Changed Coverage Δ
src/FillArrays.jl 99.74% <100.00%> (+<0.01%) ⬆️
src/fillalgebra.jl 100.00% <100.00%> (ø)

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

@jishnub jishnub requested a review from dlfivefifty August 22, 2023 17:55
@dlfivefifty dlfivefifty merged commit fef31cd into master Aug 23, 2023
@dlfivefifty dlfivefifty deleted the jishnub/reducefirstones branch August 23, 2023 18:42
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants