From fd4d78c8714b8a2b1d8f951d9e32ab31c757fb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Sun, 15 Dec 2024 09:34:22 +0100 Subject: [PATCH] promotion --- src/arithmetic.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arithmetic.jl b/src/arithmetic.jl index d94e626..a8d1dab 100644 --- a/src/arithmetic.jl +++ b/src/arithmetic.jl @@ -31,6 +31,9 @@ for op in [:+, :-, :*] function Base.$op(p::_AE, q::_AE) return MA.operate_to!(SA._preallocate_output($op, p, q), $op, p, q) end + function Base.promote_rule(Q::Type{<:_APL}, P::Type{<:_AE}) + return promote_type(Q, MP.polynomial_type(P)) + end end end for op in [:+, :-]