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

fixes strictdefs with when nimvm #24409

Merged
merged 2 commits into from
Nov 5, 2024
Merged

fixes strictdefs with when nimvm #24409

merged 2 commits into from
Nov 5, 2024

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Nov 5, 2024

ref #24225
related #24306

Code in branches must not affect semantics of the code that follows the
when nimvm statement. E.g. it must not define symbols that are used in
the following code.

The test shouldn't have passed when #24306
would be implemented somehow. Some third packages have already misused when nimvm by defining symbols in the other branch of when nimvm.

e.g. in status-im/nim-unittest2#34

when nimvm:
  discard
else:
  let suiteName {.inject.} = nameParam

use(suiteName)

@Araq Araq merged commit c71de10 into devel Nov 5, 2024
21 checks passed
@Araq Araq deleted the pr_strictdefs2 branch November 5, 2024 14:14
Copy link
Contributor

github-actions bot commented Nov 5, 2024

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

Hint: mm: orc; opt: speed; options: -d:release
176769 lines; 8.712s; 653.602MiB peakmem

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.

2 participants