Skip to content

Commit

Permalink
fix geteltype
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Nov 20, 2018
1 parent cb5a0cb commit 6370056
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/indexnotation/tensorexpressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ function geteltype(ex::Expr)
end
elseif ex.head == :call && ex.args[1] == :conj
return geteltype(ex.args[2])
elseif isscalarexpr(ex)
return :(typeof($ex))
else
# return :(eltype($ex)) # would probably lead to doing the same operation twice
throw(ArgumentError("unable to determine eltype"))
end
end
Expand Down

0 comments on commit 6370056

Please sign in to comment.