Skip to content

Commit

Permalink
Fix push!!(SVector(0), 0.5)
Browse files Browse the repository at this point in the history
fix #18
  • Loading branch information
tkf committed Sep 3, 2019
1 parent d324583 commit 7e4e95f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/NoBang/staticarrays.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
push(xs::StaticArrays.StaticArray, x) = StaticArrays.push(xs, x)
push(xs::StaticArrays.StaticVector, x) = vcat(xs, StaticArrays.SVector(x))
1 change: 1 addition & 0 deletions test/test_push.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using BangBang.NoBang: push
@test push!!((a=0,), :b => 1) === (a=0, b=1)
@test push!!((a=0,), Val(:b) => 1) === (a=0, b=1)
@test push!!(SVector(0), 1) === SVector(0, 1)
@test push!!(SVector(0), 0.5) === SVector(0.0, 0.5)
@test push!!(ImmutableDict(:a=>1), :b=>2) ==
ImmutableDict(ImmutableDict(:a=>1), :b=>2)
@test push!!(Dict(), :a=>1)::Dict{Any,Any} == Dict(:a=>1)
Expand Down

0 comments on commit 7e4e95f

Please sign in to comment.