Since v0.49, evaluating polynomials on their coefficient type gives an ambiguity error.
julia> using AbstractAlgebra
julia> R, x = polynomial_ring(QQ, :x)
(Univariate polynomial ring in x over rationals, x)
julia> x(QQ(1))
ERROR: MethodError: (::AbstractAlgebra.Generic.Poly{Rational{BigInt}})(::Rational{BigInt}) is ambiguous.
Candidates:
(f::PolyRingElem)(a)
@ AbstractAlgebra C:\Users\nando\.julia\packages\AbstractAlgebra\a2EqM\src\Poly.jl:3514
(f::PolyRingElem{T})(a::T) where T
@ AbstractAlgebra C:\Users\nando\.julia\packages\AbstractAlgebra\a2EqM\src\Poly.jl:3522
Possible fix, define
(::PolyRingElem{T})(::RingElement) where T<:RingElement
Stacktrace:
[1] top-level scope
@ REPL[5]:1
It works with evaluate(x, QQ(1)).
Since v0.49, evaluating polynomials on their coefficient type gives an ambiguity error.
It works with
evaluate(x, QQ(1)).