Skip to content

Commit

Permalink
Fix buggy +(x::Integer, y::FpPolyRingElem) method
Browse files Browse the repository at this point in the history
Bug found by new conformance tests for adhoc operators
  • Loading branch information
fingolfin committed Nov 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 24fb717 commit 6f7d06a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flint/gfp_fmpz_poly.jl
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 6f7d06a

Please sign in to comment.