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

don't typecheck untyped + allow void typed template param default values #24219

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Oct 3, 2024

Previously, the compiler never differentiated between untyped/typed argument default values and other types, it considered any parameter with a type as typed and called semExprWithType, which both typechecked it and disallowed void expressions. Now, we perform no typechecking at all on untyped template param default values, and call semExpr instead for typed params, which allows expressions with void type.

@Araq Araq merged commit 4eed341 into nim-lang:devel Oct 3, 2024
19 checks passed
Copy link
Contributor

github-actions bot commented Oct 3, 2024

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

Hint: mm: orc; opt: speed; options: -d:release
174662 lines; 8.111s; 653.801MiB 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