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

Sorting should throw when a comparison is not defined #274

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jul 10, 2023

This fixes the following behavior on master:

julia> sort(Fill(im,2))
2-element Fill{Complex{Bool}}, with entries equal to im

This doesn't make sense, as complex numbers can't be ordered. After this,

julia> sort(Fill(im,2))
ERROR: MethodError: no method matching isless(::Complex{Bool}, ::Complex{Bool})

which matches the Base behavior:

julia> sort(fill(im,2))
ERROR: MethodError: no method matching isless(::Complex{Bool}, ::Complex{Bool})

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #274 (81d2618) into master (e3c8eb9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #274   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files           5        5           
  Lines         836      851   +15     
=======================================
+ Hits          834      849   +15     
  Misses          2        2           
Impacted Files Coverage Δ
src/FillArrays.jl 99.46% <100.00%> (+0.02%) ⬆️
src/fillalgebra.jl 100.00% <100.00%> (ø)

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

@dlfivefifty dlfivefifty merged commit 6122f5a into JuliaArrays:master Jul 10, 2023
22 checks passed
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.

2 participants