Skip to content

Disallow empty arrays in maximum/minimum#391

Open
jishnub wants to merge 1 commit intomasterfrom
jishnub/maximum_empty
Open

Disallow empty arrays in maximum/minimum#391
jishnub wants to merge 1 commit intomasterfrom
jishnub/maximum_empty

Conversation

@jishnub
Copy link
Copy Markdown
Member

@jishnub jishnub commented Oct 1, 2024

This mirrors the behavior of Arrays:
Currently:

julia> maximum(Fill(3, 0))
3

After this PR

julia> maximum(fill(3, 0))
ERROR: MethodError: reducing over an empty collection is not allowed; consider supplying `init` to the reducer

julia> maximum(Fill(3, 0))
ERROR: ArgumentError: reducing over an empty collection is not allowed; consider supplying `init` to the reducer

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 1, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (6f61dc3) to head (d51c230).
⚠️ Report is 22 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #391   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files           8        8           
  Lines        1147     1149    +2     
=======================================
+ Hits         1146     1148    +2     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant