-
-
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
reflection: support additional call syntaxes for @invoke[latest]
#47705
Conversation
18b0b41
to
1a7a043
Compare
elseif isexpr(ex, :.) # `x.f` | ||
f = GlobalRef(mod, :getproperty) | ||
args = flatten(ex.args) | ||
elseif isexpr(ex, :ref) # `x[i]` |
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.
We already have code like this to support the code_*
macros. Can we avoid duplicating work here?
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.
Yeah, we probably want to factor out destructure_callex
with
function gen_call_with_extracted_types(__module__, fcn, ex0, kws=Expr[]) |
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.
But maybe with a separate PR.
1a7a043
to
7d1c780
Compare
Let me merge this once CI is green, and work on the refactoring that Keno suggested in this comment in a separate PR. |
Like `@invoke (xs::Xs)[i::I] = v::V` and `@invokelatest x.f = v`. Co-Authored-By: Jameson Nash <[email protected]>
2f92890
to
3b3d7bc
Compare
Like
@invoke (xs::Xs)[i::I] = v::V
and@invokelatest x.f = v
.