Skip to content
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

make routine implicitly gensym when other gensym symbol exists again #23842

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Jul 15, 2024

fixes #23813, partially reverts #23392

Before #23392, if a gensym symbol was defined before a proc with the same name in a template even with an inject annotation, the proc would be gensym. After #23392 the proc was instead changed to be inject as long as no gensym annotation was given. Now, to keep compatibility with the old behavior, the behavior is changed back to infer the proc as gensym when no inject annotation is given, however an explicit inject annotation will still inject the proc. This is also documented in the manual as the old behavior was undocumented and the new behavior is slightly different.

@Araq Araq merged commit cd94608 into nim-lang:devel Jul 16, 2024
18 checks passed
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from cd94608

Hint: mm: orc; opt: speed; options: -d:release
173139 lines; 8.292s; 664.164MiB peakmem

narimiran pushed a commit that referenced this pull request Jul 16, 2024
…23842)

fixes #23813, partially reverts #23392

Before #23392, if a `gensym` symbol was defined before a proc with the
same name in a template even with an `inject` annotation, the proc would
be `gensym`. After #23392 the proc was instead changed to be `inject` as
long as no `gensym` annotation was given. Now, to keep compatibility
with the old behavior, the behavior is changed back to infer the proc as
`gensym` when no `inject` annotation is given, however an explicit
`inject` annotation will still inject the proc. This is also documented
in the manual as the old behavior was undocumented and the new behavior
is slightly different.

(cherry picked from commit cd94608)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression from 1.6 to 2.0/devel with templates with gensym proc
2 participants