From 6f7d06a41b0c6f4c9301d3755eac3811df4a57a7 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 8 Nov 2024 04:31:08 +0100 Subject: [PATCH] Fix buggy +(x::Integer, y::FpPolyRingElem) method Bug found by new conformance tests for adhoc operators --- src/flint/gfp_fmpz_poly.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flint/gfp_fmpz_poly.jl b/src/flint/gfp_fmpz_poly.jl index 69cd5b843e..5d42998ce7 100644 --- a/src/flint/gfp_fmpz_poly.jl +++ b/src/flint/gfp_fmpz_poly.jl @@ -94,7 +94,7 @@ end +(x::FpPolyRingElem, y::Integer) = x + ZZRingElem(y) -+(x::Integer, y::FpPolyRingElem) = ZZRingElem(y) + x ++(x::Integer, y::FpPolyRingElem) = ZZRingElem(x) + y function +(x::FpPolyRingElem, y::FpFieldElem) (base_ring(x) != parent(y)) && error("Elements must have same parent")