Skip to content

Commit

Permalink
Merge pull request #360 from mohamed82008/patch-2
Browse files Browse the repository at this point in the history
Use tfill instead of fill in testvalue
  • Loading branch information
fverdugo committed Aug 13, 2020
2 parents 28dd80b + c071aa8 commit 839ae09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Inference/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ testvalue(::Type{T}) where T = zero(T)
testvalue(v) = testvalue(typeof(v))

function testvalue(::Type{T}) where T<:AbstractArray{E,N} where {E,N}
similar(T,fill(0,N)...)
similar(T,tfill(0,Val(N))...)
end

function testvalue(::Type{T}) where T<:Fill{E,N} where {E,N}
Fill(zero(E),fill(0,N)...)
Fill(zero(E),tfill(0,Val(N))...)
end

function testvalue(::Type{<:Tuple})
Expand Down

0 comments on commit 839ae09

Please sign in to comment.