Skip to content

Commit c557301

Browse files
authored
improve inference in Fun() (#151)
1 parent b0155d2 commit c557301

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.6.6"
3+
version = "0.6.7"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Fun.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end
2020
const VFun{S,T} = Fun{S,T,Vector{T}}
2121

2222
Fun(sp::Space,coeff::AbstractVector) = Fun{typeof(sp),eltype(coeff),typeof(coeff)}(sp,coeff)
23-
Fun() = Fun(identity)
23+
Fun() = Fun(identity, ChebyshevInterval())
2424
Fun(d::Domain) = Fun(identity,d)
2525
Fun(d::Space) = Fun(identity,d)
2626

test/SpacesTest.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ using ApproxFunOrthogonalPolynomials
183183
end
184184

185185
@testset "ApproxFunOrthogonalPolynomials" begin
186+
@test (@inferred Fun()) == Fun(x->x, Chebyshev())
187+
186188
v = rand(4)
187189
v2 = transform(NormalizedChebyshev(), v)
188190
@test itransform(NormalizedChebyshev(), v2) v

0 commit comments

Comments
 (0)