Types on kwargs can lead to confusing situations #16490
Labels
error handling
Handling of exceptions by Julia or the user
keyword arguments
f(x; keyword=arguments)
I just helped @evanfields boil down a more complex situation to the following:
On Julia 0.4, with
trigger(5, 10, c = 3)
you getWhich I consider fairly understandable (unfortunate that you don't get told which field it was though).
With
trigger(5, 10)
, again on 0.4, however, you getWhich, while fairly understandable in retrospect, is totally baffling unless you know how
kwargs
are lowered. Its unfortunate that its a different error message though, for a similar sin. It is also hard to figure out whats going on in more complex cases - here it was a 2+1 arg function, but the original setting was much more interesting.On Julia 0.5 you get
for the first, which is worse than 0.4 (the null:0 is delightful) , and for the second case you get
which is even more exciting maybe.
Is there a path forward for making these messages nicer, or is too much information lost when lowering?
The text was updated successfully, but these errors were encountered: