You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only positional arguments are currently checked. It might also be worth adding an extra stern warning for unused keyword argument slurps, because they can cause silent failures on misspelled keyword arguments:
julia>badfun(;some_arg=1, another_arg=2, kwargs...) = some_arg*another_arg^2
badfun (generic function with 1 method)
julia>badfun(;another_arg=5)
25
julia>badfun(;anotherarg=5)
4
julia>betterfun(;some_arg=1, another_arg=2) = some_arg*another_arg^2
betterfun (generic function with 1 method)
julia>betterfun(;another_arg=5)
25
julia>betterfun(;anotherarg=5)
ERROR: MethodError: no method matching betterfun(; anotherarg=5)
Closest candidates are:betterfun(; some_arg, another_arg) at REPL[2]:1 got unsupported keyword argument "anotherarg"
Stacktrace:...
The text was updated successfully, but these errors were encountered:
Only positional arguments are currently checked. It might also be worth adding an extra stern warning for unused keyword argument slurps, because they can cause silent failures on misspelled keyword arguments:
The text was updated successfully, but these errors were encountered: