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

ignore match errors to expected types of tuple constructor elements #24611

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Jan 11, 2025

fixes #24609

A tuple may have an incompatible expected type if there is a converter match to it. So the compiler should not error when trying to match the individual elements in the constructor to the elements of the expected tuple type, this will be checked when the tuple is entirely constructed anyway.

@Araq Araq merged commit 8d0e853 into nim-lang:devel Jan 15, 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 8d0e853

Hint: mm: orc; opt: speed; options: -d:release
178408 lines; 8.538s; 651.211MiB peakmem

narimiran pushed a commit that referenced this pull request Jan 20, 2025
…24611)

fixes #24609

A tuple may have an incompatible expected type if there is a converter
match to it. So the compiler should not error when trying to match the
individual elements in the constructor to the elements of the expected
tuple type, this will be checked when the tuple is entirely constructed
anyway.

(cherry picked from commit 8d0e853)
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.

Tuple converter regression
2 participants