Skip to content

fixes #23564; hasCustomPragma skips alises types #24994

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

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Jun 12, 2025

fixes #23564

perhaps handle generic aliases (tyGenericInst for aliases types) if needed

; hasCustomPragma skips alises types
@ringabout ringabout marked this pull request as draft June 12, 2025 13:48
@ringabout
Copy link
Member Author

ringabout commented Jun 12, 2025

It seems that we need to add an internal version of getTypeInst to skip aliases types

@metagn
Copy link
Collaborator

metagn commented Jun 12, 2025

I would think it should be exposed to users as well. The first way I thought of doing it was to go in the impl for the type alias sym and recurse with the body as the type instead, but the body (Sym "T0") just has the alias type (T) as its sym which gets used by getTypeInst and causes a loop. Maybe skipAlias or something more general can be exposed instead. (might be fine to specialize since getType never represents a tyAlias).

@ringabout
Copy link
Member Author

ringabout commented Jun 13, 2025

Okay, I will add something like getTypeInstSkipAlias to skip aliases

@ringabout ringabout marked this pull request as ready for review June 13, 2025 14:47
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 stops working after typedesc is copied
2 participants