Why is this a BoundsError (passing keyword arguments wrong)

question

#1

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?


#2

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


#3

Good to know it’s being tracked. Thanks.