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

always skip static types for result of typeof #24718

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Feb 24, 2025

fixes #24715

In generic typechecking, unresolved static param symbols (i.e. skGenericParam) have the static type itself as their type when used in an expression. This is not the case when the static param is resolved (the type is wrapped in static when necessary), but semchecking of types and generic typechecking expects the type of the value to be wrapped in static (at least array[N, int] breaks). So for now, to solve the issue, typeof just skips static types.

@Araq Araq merged commit 514a25c into nim-lang:devel Feb 25, 2025
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 514a25c

Hint: mm: orc; opt: speed; options: -d:release
178505 lines; 8.674s; 651.27MiB 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.

Regression from 2.0 to 2.2/devel with static generics
2 participants