Change == to error by default (instead of returning false) when comparing elements for which no equality test has been implemented#1853
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1853 +/- ##
==========================================
+ Coverage 88.14% 88.15% +0.01%
==========================================
Files 119 126 +7
Lines 30019 32076 +2057
==========================================
+ Hits 26460 28277 +1817
- Misses 3559 3799 +240 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Note that this does not address all of the problems, since it is still possible to compare elements with the same type but different parents. |
| ############################################################################### | ||
|
|
||
| function Base.:(==)(x::AbstractAlgebra.SetElem, y::AbstractAlgebra.SetElem) | ||
| x === y && return true |
There was a problem hiding this comment.
I've now just added this, to get the tests to run; but this is not meant to preempt any discussion, i.e., we can still remove it again, but I wanted to at least know if with this the OscarCI etc. tests complete or (still) don't.
|
In triage nobody voiced objections to this plan, but @fieker correctly reminded that we probably want a function to do comparisons that never fails; my proposal for that is to use Or we define a new function for this.... (And matrices deserve special attention as well as their parents are not rings) |
|
I would prefer to have this in the same breaking release as #1854 (so not in 0.48) |
== to error by default (instead of returning false) when comparing elements for which no equality test has been implemented
|
This revealed what looks like another genuine bug in Oscar.jl: |
|
Now I wonder: should we maybe also define |
|
Triage discussion: Let's try to define @lgoettgens points out that e.g. My view is that in that case I'd still prefer an error over a potentially wrong result... |
Closes #1800, resolves oscar-system/Oscar.jl#4107.
This includes only the snippet from #1800 (comment)
cc @joschmitt