Skip to content

Commit f6064fe

Browse files
committed
Fix allocation on Julia v1.6
1 parent b51307b commit f6064fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/comparison.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ ordering(p::AbstractPolynomialLike) = ordering(typeof(p))
328328

329329
# We reverse the order of comparisons here so that the result
330330
# of x < y is equal to the result of Monomial(x) < Monomial(y)
331-
function compare(
331+
# Without `Base.@pure`, TypedPolynomials allocates on Julia v1.6
332+
# with `promote(x * y, x)`
333+
Base.@pure function compare(
332334
v1::AbstractVariable,
333335
v2::AbstractVariable,
334336
::Type{<:AbstractMonomialOrdering},

0 commit comments

Comments
 (0)