Pluto.jl
Pluto.jl copied to clipboard
Stack traces: kwargs shown at wrong place
The kwargs are showing up at the start, not the end...
julia> # ╔═╡ 79b51e48-ab15-11ee-3759-9d14aacd5478
VERSION
v"1.9.3"
julia> # ╔═╡ 02688dc8-37d9-4043-b12f-3849abbd9b28
f(g, a; kw...) = error();
julia> # ╔═╡ ec17c915-0198-49f8-ba5a-ec3d55555d6e
f(1,2)
ERROR:
Stacktrace:
[1] error()
@ Base ./error.jl:44
[2] f(g::Int64, a::Int64; kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Main ./REPL[3]:2
[3] f(g::Int64, a::Int64)
@ Main ./REPL[3]:2
[4] top-level scope
@ REPL[4]:2
Simpler example:
julia> g(x::Integer; y::String) = error()
g (generic function with 1 method)
julia> g(1; y="twee")
ERROR:
Stacktrace:
[1] error()
@ Base ./error.jl:44
[2] g(x::Int64; y::String)
@ Main ./REPL[5]:2
[3] top-level scope
@ REPL[6]:2