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

Commit 1521237

Browse files
getzdanararslan
authored andcommitted
Add missing LineNumberNode to at-swappable call (fixes #257) (#259)
1 parent 1cd77da commit 1521237

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/operators.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ macro dataarray_binary_scalar(vectorfunc, scalarfunc, outtype, swappable)
138138
if swappable
139139
# For /, Array/Number is valid but not Number/Array
140140
# All other operators should be swappable
141-
map!(x->Expr(:macrocall, Symbol("@swappable"), x, scalarfunc), fns, fns)
141+
if VERSION < v"0.7.0-DEV.328"
142+
map!(x->Expr(:macrocall, Symbol("@swappable"), x, scalarfunc), fns, fns)
143+
else
144+
map!(x->Expr(:macrocall, Symbol("@swappable"), LineNumberNode(@__LINE__), x, scalarfunc), fns, fns)
145+
end
142146
end
143147
Expr(:block, fns...)
144148
end

0 commit comments

Comments
 (0)