Skip to content

Commit

Permalink
test for .op loop fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Dec 13, 2016
1 parent 3b15629 commit 0ef3d81
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ import Base.Meta: isexpr
# PR #17623: Fused binary operators
@test [true] .* [true] == [true]
@test [1,2,3] .|> (x->x+1) == [2,3,4]
let g = Int[], = (a,b) -> let c=a+2b; push!(g, c); c; end
@test [1,2,3] .⊕ [10,11,12] .⊕ [100,200,300] == [221,424,627]
@test g == [21,221,24,424,27,627] # test for loop fusion
end

# PR 16988
@test Base.promote_op(+, Bool) === Int
Expand Down

0 comments on commit 0ef3d81

Please sign in to comment.