Skip to content

Commit 7388347

Browse files
support bool
1 parent a38c1d5 commit 7388347

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.26.0"
4+
version = "2.26.1"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:Enum,T2<:Enum,N}
5151
fill!(b,a)
5252
end
5353

54-
function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:Number,T2<:Number,N}
54+
function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:Union{Number,Bool},T2<:Union{Number,Bool},N}
5555
fill!(b, a)
5656
end
5757

test/utils_test.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,9 @@ recursivefill!(x, SVector{10}(ones(10)))
8888
x = [MVector{10}(zeros(10)), MVector{10}(zeros(10))]
8989
recursivefill!(x, 1.0)
9090
@test x[1] == MVector{10}(ones(10))
91+
@test x[2] == MVector{10}(ones(10))
92+
93+
x = [similar(x[1]), similar(x[1])]
94+
recursivefill!(x, true)
95+
@test x[1] == MVector{10}(ones(10))
9196
@test x[2] == MVector{10}(ones(10))

0 commit comments

Comments
 (0)