From 532e5996cce0e0bb12c589a06821d4171ac1cdd7 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 18 Oct 2024 14:51:58 +0200 Subject: [PATCH] Tweak equality check --- test/Rings-conformance-tests.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/Rings-conformance-tests.jl b/test/Rings-conformance-tests.jl index 6243d67f77..32eded866e 100644 --- a/test/Rings-conformance-tests.jl +++ b/test/Rings-conformance-tests.jl @@ -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)