-
-
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
strangeness when macro is closure for proc #3855
Labels
VM
see also `const` label
Comments
I think lambda-lifting doesn't consider |
|
Updated example: import strutils
macro foo(a : static[string]) =
proc bar() =
echo capitalizeAscii(a)
bar()
foo("foo") |
Even simpler: macro foo(a: static[string]) =
proc bar() =
echo a
bar()
foo("foo") |
I found similar strange bug with macro foo(a: static[int]) =
echo a
proc bar() =
echo a
bar()
foo(123) Output: 0
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code:
Generates:
The text was updated successfully, but these errors were encountered: