Skip to content

Commit 2e71bb8

Browse files
committed
add an isbits test
1 parent ff39b09 commit 2e71bb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/basics.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ end
6969
@test m2f.x.x === m2f.y.x
7070
m2p = fmapstructure(identity, m2; prune = Bar(0))
7171
@test m2p == (x = (x = [1, 2, 3], y = 4), y = Bar(0))
72+
73+
# Repeated isbits types should not automatically be regarded as shared:
74+
m3 = Foo(Foo(shared, 1:3), Foo(1:3, shared))
75+
m3p = fmapstructure(identity, m3; prune = 0)
76+
@test m3p.y.y == 0
77+
@test_broken m3p.y.x == 1:3
7278
end
7379

7480
###

0 commit comments

Comments
 (0)