Skip to content

don't set sym of generic param type value to generic param sym #24995

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Jun 12, 2025

fixes #23713

linkTo normally sets the sym of the type as well as the type of the sym, but this is not wanted for custom pragmas as it would look up the definition of the generic param and not the definition of its value. I don't see a practical use for this either.

@Araq
Copy link
Member

Araq commented Jun 12, 2025

@narimiran looks safe to backport.

@Araq Araq merged commit 7701b3c into nim-lang:devel Jun 12, 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 7701b3c

Hint: mm: orc; opt: speed; options: -d:release
182719 lines; 8.516s; 659.352MiB peakmem

narimiran pushed a commit that referenced this pull request Jun 16, 2025
fixes #23713

`linkTo` normally sets the sym of the type as well as the type of the
sym, but this is not wanted for custom pragmas as it would look up the
definition of the generic param and not the definition of its value. I
don't see a practical use for this either.

(cherry picked from commit 7701b3c)
narimiran pushed a commit that referenced this pull request Jun 16, 2025
fixes #23713

`linkTo` normally sets the sym of the type as well as the type of the
sym, but this is not wanted for custom pragmas as it would look up the
definition of the generic param and not the definition of its value. I
don't see a practical use for this either.

(cherry picked from commit 7701b3c)
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.

hasCustomPragma does not work on generic types
2 participants