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

fully disable static paramTypesMatch for tyFromExpr in generics #24049

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Sep 2, 2024

fixes #24044

When matching a tyFromExpr against a static generic parameter, paramTypesMatch tries to evaluate it as a constant expression, which causes a segfault in the case of #24044. In #24005 a consequence of the same behavior was an issue where nkStaticExpr was created for tyFromExpr which made it not instantiate, so only the generation of nkStaticExpr was disabled. Instead we now just completely ignore tyFromExpr matching a static generic parameter in generic contexts and keep it untouched.

@Araq Araq added the merge_when_passes_CI mergeable once green label Sep 2, 2024
@Araq Araq merged commit 1ebdcb3 into nim-lang:devel Sep 3, 2024
19 checks passed
Copy link
Contributor

github-actions bot commented Sep 3, 2024

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

Hint: mm: orc; opt: speed; options: -d:release
174002 lines; 8.783s; 655.379MiB peakmem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge_when_passes_CI mergeable once green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crash on template evaluation for generic static int
2 participants