julia
julia copied to clipboard
ParseError with list comprehension and broadcasting
"[1.0 .+[1 1] for i=1:1]" produces a ParseError while "1.0 .+[1 1]" and "[1.0 .+ [1 1] for i=1:1]" do not.
@c42f, this seems like a bit of a mis-parse, but I'm not sure. What do you think?
unary + means that's failing for the same reason as
julia> [a b for i=1:1]
ERROR: ParseError:
I would call this a dup of https://github.com/JuliaLang/julia/issues/30464 or https://github.com/JuliaLang/julia/issues/27881 (which are actually probably dups of each other)
although admittedly the error message is kind of confusing here. I wonder if it could be something more like "a b is not a valid expression"