Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Add missing LineNumberNode to @swappable call (fixes #257) #259

Merged
merged 3 commits into from
May 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ macro dataarray_binary_scalar(vectorfunc, scalarfunc, outtype, swappable)
if swappable
# For /, Array/Number is valid but not Number/Array
# All other operators should be swappable
map!(x->Expr(:macrocall, Symbol("@swappable"), x, scalarfunc), fns, fns)
if VERSION < v"0.7.0-DEV.328"
map!(x->Expr(:macrocall, Symbol("@swappable"), x, scalarfunc), fns, fns)
else
map!(x->Expr(:macrocall, Symbol("@swappable"), LineNumberNode(@__LINE__), x, scalarfunc), fns, fns)
end
end
Expr(:block, fns...)
end
Expand Down