-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix block parameter unpacking inside macros #13813
Fix block parameter unpacking inside macros #13813
Conversation
FTR: The regression was introduced in #11597 (not yet released) |
I applied this patch on latest commit on master and tried the Athena specs again and now got: In src/components/framework/src/ext/routing/annotation_route_loader.cr:231:128
231 | [{ATHA::QueryParam, "ATH::Params::QueryParam".id}, {ATHA::RequestParam, "ATH::Params::RequestParam".id}].each do |(param_ann, param_class)|
^---------
Error: undefined macro variable '__temp_113' So there still seems to be another regression. I'll see about reducing it and will create another ticket. |
Actually no, reproduction for this is the same as #13742, but just call macro test
{%
data = [{1, 2}, {3, 4}]
data.each do |(k, v)|
pp k, v
end
%}
end
test
test
|
Apparently the normalizer mutates do |__temp_4|
k, v = __temp_4
k, v = __temp_1
k
end |
Awesome! Testing again with that latest commit and all Athena specs pass. Thanks! |
Specs are failing though. |
So |
Fixes #13742 (regression on master).
This effectively reverts #13709; it seems the compiler doesn't need normalizations on all those kinds of macro nodes every time.