Skip to content

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Jan 25, 2024

A PR for PR #19174

@dwijnand
Copy link
Member Author

Original PR needs rebasing.

odersky and others added 9 commits February 7, 2024 18:45
Subclasses of Selectable can instantiate Fields to a named tuple type
that provides possible selection names and their types on instances of the type.

See: https://contributors.scala-lang.org/t/expanding-changing-selectable-based-on-upcoming-named-tuples-feature/6395/5
I usually try to avoid explicit returns, but here they do make the
code easier to read.
The selectDynamic call could already have influenced type variables
in the expected type before we wrap it in a cast.

Need to pass in the right expected type to the typedDynamicSelect.
NamedTyple.From should be the identity for named tuple arguments
We can drop the unnamed tuple <: named tuple relationship, but still
allow tuple syntax to conform to a named tuple prototype, with a small
change in Desugar#tuple.
@dwijnand dwijnand closed this Feb 23, 2024
@dwijnand dwijnand deleted the dnw/named-tuples-2 branch February 23, 2024 10:27
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.

2 participants