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

Drop EmptyTuple handling from NamedTupleDecomposition.apply #22340

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

EugeneFlesselle
Copy link
Contributor

We previously needed to handle the case where the result of toTuple was an EmptyTuple separately from the rest, since apply used to be only defined for NonEmptyTuples. This was changed in #21291, making the inline match in NamedTupleDecomposition.apply no longer necessary.

The underlying issue with the proxies introduced to handle opaque types with inline defs is likely still present. Nevertheless, it is probably best to fix this specific instance of the problem with NamedTuples as soon as possible.

Fixes #22324

We previously needed to handle the case where the result of `toTuple` was an
`EmptyTuple` separately from the rest, since `apply` used to be only defined for
`NonEmptyTuple`s. This was changed in scala#21291, making the inline match in
`NamedTupleDecomposition.apply` no longer necessary.

The underlying issue with the proxies introduced to handle opaque types with
inline defs is likely still present. Nevertheless, it is probably best to fix
this specific instance of the problem with NamedTuples as soon as possible.

Fixes scala#22324
aherlihy added a commit to aherlihy/scala3 that referenced this pull request Jan 10, 2025
aherlihy added a commit to aherlihy/scala3 that referenced this pull request Jan 10, 2025
@EugeneFlesselle EugeneFlesselle enabled auto-merge (rebase) January 11, 2025 00:33
@EugeneFlesselle EugeneFlesselle merged commit 74aa123 into scala:main Jan 13, 2025
29 checks passed
@EugeneFlesselle EugeneFlesselle deleted the fix-i22324 branch January 13, 2025 10:51
aherlihy added a commit to aherlihy/scala3 that referenced this pull request Jan 13, 2025
@WojciechMazur WojciechMazur added this to the 3.6.4 milestone Jan 16, 2025
bracevac pushed a commit to dotty-staging/dotty that referenced this pull request Jan 19, 2025
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.

Inlining issue for named tuples hidden behind opaque types
3 participants