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
What #474 did for quasis, we also need to do for macro arguments.
I started to suspect/remember this as I was working on the #116 stuff and really throwing code around. Here's a golfed bit of code showcasing the problem:
$ bin/007 -e='macro sq(x) { quasi { my n = 5; {{{x}}} * {{{x}}} } }; my n = 7; say(sq(n))'
25
We get a hygiene leak there, and get 25 instead of 49, because the n that gets transported into the macro via the argument x isn't being detached.
#380 is related; it's talking about putting code back. Here we're talking about pulling code away.
The text was updated successfully, but these errors were encountered:
What #474 did for quasis, we also need to do for macro arguments.
I started to suspect/remember this as I was working on the #116 stuff and really throwing code around. Here's a golfed bit of code showcasing the problem:
We get a hygiene leak there, and get
25
instead of49
, because then
that gets transported into the macro via the argumentx
isn't being detached.#380 is related; it's talking about putting code back. Here we're talking about pulling code away.
The text was updated successfully, but these errors were encountered: