Skip to content

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Sep 5, 2024

fixes #22342, fixes #22607

Another followup of #22029, when expressions in general in generic type bodies now behave like nkRecWhen does since #24042, leaving them as tyFromExpr if a condition is uncertain. The tests for the issues were originally added but left disabled in #24005.

@Araq Araq merged commit 7cd1777 into nim-lang:devel Sep 6, 2024
19 checks passed
Copy link
Contributor

github-actions bot commented Sep 6, 2024

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

Hint: mm: orc; opt: speed; options: -d:release
174157 lines; 8.918s; 655.23MiB peakmem

metagn added a commit to metagn/Nim that referenced this pull request Sep 6, 2024
Araq pushed a commit that referenced this pull request Sep 8, 2024
fixes CI, refs #24066, refs #24065

The combination of #24065 and #24066 caused a CI failure where a `when`
branch that was never compiled gave an undeclared identifier error. This
is because the `when` branch was being semchecked with `semGenericStmt`
without `withinMixin`, which is the flag `semgnrc` normally gives to
`when` branch bodies. To fix this, just pass the whole `when` stmt to
`semGenericStmt` rather than the individual blocks.

The alternative would be to just replace the calls to `semGenericStmt`
with a new proc that does the same thing, just with the flags
`{withinMixin}`.
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.

Static generic parameter does not work in param type scopes in procs Can't see static generic args in compile time context in nim alias
2 participants