-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
result variable is not hygienic in templates #7791
Comments
Maybe related to this: #7323 |
@mratsim The cause for the problem you link to is a different one. The quote do notation tries to bind local variables and functions that are in scope, including the result variable, and this basically goes wrong all the time. |
Forgot about this when I created #8208, it's not just the result variable, all variables are unhygienic when the template is used inside a proc. |
Wondering, any progress on this? |
I just tested it, it is still broken. |
When a template introduces a new variable, it is normally hidden in the context where the templates expands into, to prevent name clashes. The problem is, that when a template generates a function header, this function has this implicit result variable that is not hidden.
Best seen in this example
compilation output:
This causes a problem in my ast pattern matching library:
krux02/ast-pattern-matching#6
The text was updated successfully, but these errors were encountered: