Why is this a BoundsError (passing keyword arguments wrong)

Here is a minimal example:

f(x::Int; y::Int = 1) = x + y
f(1; 2)

This produces an error:

image

which is not very informative. It doesn’t tell you line numbers, and from “BoundsError” I had a hard time figuring out that I was passing a keyword argument wrong.

Should I raise an issue to improve this error message?

https://github.com/JuliaLang/julia/issues/9972

1 Like

Good to know it’s being tracked. Thanks.