Skip to content

Commit f876e6b

Browse files
committed
Revert #14 for Julia 0.6
1 parent 1e290d0 commit f876e6b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mono.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ function Monomial{C}(α) where C
2828
α == 1 || error("Cannot convert to a Monomial{$C} as it is not one")
2929
Monomial{C}(PolyVar{C}[], Int[])
3030
end
31-
# defaults to commutative so that `Monomial(1)` is consistent with TypedPolynomials
32-
Monomial(α) = Monomial{true}(α)
31+
32+
@static if VERSION v"0.7-"
33+
# defaults to commutative so that `Monomial(1)` is consistent with TypedPolynomials
34+
Monomial::Number) = Monomial{true}(α)
35+
end
3336

3437
Base.copy(m::M) where {M<:Monomial} = M(m.vars, copy(m.z))
3538

0 commit comments

Comments
 (0)