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

Fix type hints for tuples #2176

Merged
merged 4 commits into from
Feb 9, 2025
Merged

Conversation

FnControlOption
Copy link
Contributor

Fixes #2065

FnControlOption and others added 4 commits February 8, 2025 21:06
This change also ensures that the field types always have
`is_type_val == true` which unfortunately regresses the ability to
destructure tuple that are made of types.
Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you may have noticed, handling tuple types has two possible code paths, one for Analyser.Type.Data.tuple and one for Analyser.Type.Data.container which is unnecessarily complicated.

I started out experimenting this to see if there any issues but ended up doing the entire change myself so I pushed it to your branch. I hope you don't mind.

@Techatrix Techatrix merged commit 1ce6d64 into zigtools:master Feb 9, 2025
6 checks passed
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.

incorrect type hints for tuples
2 participants