Skip to content

Commit

Permalink
Tweak equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Oct 27, 2024
1 parent f2a2b94 commit 532e599
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/Rings-conformance-tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,8 @@ end


# helper
equality(a, b) = isequal(a, b)
function equality(a::T, b::T) where T <: AbstractAlgebra.NCRingElement
if is_exact_type(T)
function equality(a, b)
if is_exact_type(typeof(a)) && is_exact_type(typeof(b))
return a == b
else
return isapprox(a, b)
Expand Down

0 comments on commit 532e599

Please sign in to comment.