-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add keyword argument support to invoke
#20345
Conversation
jl_value_t *kws = jl_get_keyword_sorter(func); | ||
JL_GC_PUSH1(&argtypes); | ||
if (jl_is_tuple(argtypes)) { | ||
jl_depwarn("`invoke(f, (types...), ...)` is deprecated, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we don't need this depwarn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we do, since I transform the tuple type, so the following call to jl_f_invoke
won't see that there was a tuple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this could just be an error since we never supported invoke
with with a tuple of types and kwargs....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's gentler to just leave this as a deprecation even though it could only happen if someone left an invoke(f, (t...), args...)
call around and then added a keyword to it. Doesn't really hurt and we'll delete this in 1.0 anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure....
Not the prettiest thing ever, but will get the job done.
fixes #7045