Skip to content

Commit ade496d

Browse files
committed
Tweak for towers of polys
1 parent f72a3a1 commit ade496d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Poly.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,6 +3366,11 @@ function (f::PolyRingElem)(a::PolyRingElem)
33663366
return compose(f, a; inner = :second)
33673367
end
33683368

3369+
function (f::PolyRingElem{T})(a::T) where T
3370+
base_ring(f) == parent(a) || return subst(f, a)
3371+
return evaluate(f, a)
3372+
end
3373+
33693374
(f::PolyRingElem)(a::Integer) = evaluate(f, a)
33703375

33713376
function (f::PolyRingElem)(a::RingElem)

0 commit comments

Comments
 (0)