Skip to content

Commit

Permalink
Merge pull request #80 from mhauru/master
Browse files Browse the repository at this point in the history
A more helpful error message when splatting into @ncon.
  • Loading branch information
Jutho authored Jan 22, 2020
2 parents b480558 + 0ff4365 commit 5880c60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/indexnotation/tensormacros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ function _nconmacro(tensors, indices, kwargs = nothing)
else
throw(ArgumentError("invalid @ncon syntax"))
end
if any(isa(ta, Expr) && ta.head === :... for ta in tensorargs)
throw(ArgumentError("@ncon does not support splats (...) in tensor lists."))
end
conjlist = fill(false, length(tensorargs))
for i = 1:length(tensorargs)
if tensorargs[i] isa Expr
Expand Down

0 comments on commit 5880c60

Please sign in to comment.