# Why is this a BoundsError (passing keyword arguments wrong)

**URL:** https://discourse.julialang.org/t/why-is-this-a-boundserror-passing-keyword-arguments-wrong/6936
**Category:** General Usage
**Tags:** question
**Created:** [November 7, 2017, 4:56pm UTC](https://discourse.julialang.org/t/why-is-this-a-boundserror-passing-keyword-arguments-wrong/6936 "2017-11-07T16:56:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [November 7, 2017, 4:56pm UTC](https://discourse.julialang.org/t/why-is-this-a-boundserror-passing-keyword-arguments-wrong/6936/1 "2017-11-07T16:56:32Z")

</div>

Here is a minimal example:

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

```

This produces an error:

![image](https://global.discourse-cdn.com/julialang/original/3X/d/c/dc59f666fddf3474853a42c8701d4a22403f9a08.png)

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?

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [November 7, 2017, 6:21pm UTC](https://discourse.julialang.org/t/why-is-this-a-boundserror-passing-keyword-arguments-wrong/6936/2 "2017-11-07T18:21:48Z")

</div>

[https://github.com/JuliaLang/julia/issues/9972](https://github.com/JuliaLang/julia/issues/9972)

---

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [November 7, 2017, 6:41pm UTC](https://discourse.julialang.org/t/why-is-this-a-boundserror-passing-keyword-arguments-wrong/6936/3 "2017-11-07T18:41:40Z")

</div>

Good to know it’s being tracked. Thanks.
