I define a function with multiple parameters, but it throws a MethodError when @. is not the last parameter.
Example:
julia> function f(x, y)
println(x, y)
end
f (generic function with 1 method)
julia> x = [1, 2, 3]
3-element Array{Int64,1}:
1
2
3
julia> f(x, x.^2)
[1, 2, 3][1, 4, 9]
julia> f(x, @. x^2)
[1, 2, 3][1, 4, 9]
julia> f(x.^2, x)
[1, 4, 9][1, 2, 3]
julia> f(@. x^2, x)
ERROR: MethodError: no method matching f(::Tuple{Array{Int64,1},Array{Int64,1}})
Closest candidates are:
f(::Any, ::Any) at REPL[1]:1
Stacktrace:
[1] top-level scope at REPL[6]:1
Is this a bug?