Skip to content

Commit 263b965

Browse files
authored
close issue #566 (#567)
* close issue #566 * remove bad test * typo
1 parent 5d4b35f commit 263b965

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Polynomials"
22
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
33
license = "MIT"
44
author = "JuliaMath"
5-
version = "4.0.7"
5+
version = "4.0.8"
66

77
[deps]
88
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/rational-functions/common.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ function Base.convert(::Type{PQ}, p::P) where {PQ <: AbstractRationalFunction, P
6969
T = isnothing(T′) ? eltype(p) : T′
7070
X = indeterminate(PQ, p)
7171

72-
𝐩 = convert(Polynomial{T,X}, p)
72+
𝑃 = Polynomials.:(p)
73+
𝐩 = convert(𝑃{T,X}, p)
7374
rational_function(PQ, 𝐩, one(𝐩))
7475
end
7576

test/rational-functions.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ end
118118

119119
## T, Polynomial{T} promotes
120120
@test eltype([1, p, pp]) == PP
121-
@test eltype(eltype(eltype([im, p, pp]))) == Complex{Int}
121+
promote(im, p); promote(p, pp) # but promote(im, pp) fails
122+
## this is a bad test, a,b =promote(im,p) leave a P{Complex}
123+
## which doesn't convert to type pp.
124+
# @test eltype(eltype(eltype([im, p, pp]))) == Complex{Int}
122125

123126
## test mixed types promote polynomial type
124127
@test eltype([pp rr p r]) == PP

0 commit comments

Comments
 (0)