Consider the code
n = 5 z = randn(ComplexF64, n) x = zeros(n) y = zeros(n) i = 2 j = 4 @views x[i:j] , y[i:j] = reim(z[i:j])
In julia 1.6.1 this throws the error
ERROR: syntax: "i:j" is not a valid function argument name around REPL:1
Removing the indexing on the LHS gets rid of the error. i.e. the following works:
@views xx,yy = reim(z[i:j])
This seems like a bug to me but before posting an issue I thought I’d ask about it here in case I’m missing the reason why I shouldn’t expect it to work. So, is this a bug, and if not why doesn’t it work?