Skip to content

Commit e5d04fe

Browse files
committed
Fix #166
1 parent e17b88d commit e5d04fe

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DynamicPolynomials"
22
uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
33
repo = "https://github.com/JuliaAlgebra/DynamicPolynomials.jl.git"
4-
version = "0.6.1"
4+
version = "0.6.2"
55

66
[deps]
77
Future = "9fa8497b-333b-5362-9e8d-4d0656e87820"

src/promote.jl

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
function MP.promote_rule_constant(
2+
::Type{Any},
3+
::Type{<:DMonomialLike{V,M}},
4+
) where {V,M}
5+
return Any
6+
end
17
function MP.promote_rule_constant(
28
::Type{T},
39
::Type{<:DMonomialLike{V,M}},

test/runtests.jl

+6
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,10 @@ import DynamicPolynomials
8282
end
8383
end
8484

85+
@testset "Issue #166: promote_operation with Any" begin
86+
DynamicPolynomials.@polyvar x
87+
V = typeof(x)
88+
@test promote_type(V, Any) == Any
89+
end
90+
8591
include("mvp.jl")

0 commit comments

Comments
 (0)