Skip to content

Commit 10e6442

Browse files
committed
also test deep nested StructArray's broadcast.
1 parent 8c83220 commit 10e6442

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,8 @@ Base.BroadcastStyle(::Broadcast.ArrayStyle{MyArray2}, S::Broadcast.DefaultArrayS
11931193

11941194
@test identity.(StructArray(x=StructArray(a=1:3)))::StructArray == [(x=(a=1,),), (x=(a=2,),), (x=(a=3,),)]
11951195
@test (x -> x.x.a).(StructArray(x=StructArray(a=1:3))) == [1, 2, 3]
1196+
@test identity.(StructArray(x=StructArray(x=StructArray(a=1:3))))::StructArray == [(x=(x=(a=1,),),), (x=(x=(a=2,),),), (x=(x=(a=3,),),)]
1197+
@test (x -> x.x.x.a).(StructArray(x=StructArray(x=StructArray(a=1:3)))) == [1, 2, 3]
11961198

11971199
@testset "ambiguity check" begin
11981200
function _test(a, b, c)

0 commit comments

Comments
 (0)