-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Named tuples second implementation #19174
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
9d1f20d
Improvements to tuples: Drop experimental
odersky 2395ece
Improvements to Tuples: New methods
odersky 64a79c9
Improvements to tuples: Allow prefix slice in fromArray
odersky cb95265
Improvements to tuples: Rearrange types into a more logical order
odersky 6ae8252
Improvements to tuples: more new types and methods
odersky 1f79b87
Add NamedTuple object to library
odersky b9899b7
Support for named tuples with new representation
odersky 27d6288
Add doc page
odersky 5dd48f9
Make NamedTuple covariant in its value type
odersky bd9bb8a
Various tweaks
odersky e0a11cd
Harden NamedTuple handling against ill-formed NamedTuples
odersky b9d86fe
Fix test
odersky 0fbdb49
Simplify tupleElementTypes unapply handling
odersky 6f53dcd
Fix pattern matching for get matches
odersky b44f15d
Another fix for named get patterns
odersky 02aa578
Avoid widening into unreducible types when inferring types
odersky b7115e7
Fix rebase breakage
odersky 5c9bb5f
Make NamedTuples work under new MatchType spec
odersky 4758830
Avoid TypeError exception in RefinedPrinter
odersky 18f600d
Move named-tuples-strawman.ccala to pending
odersky 5513ed6
Update check file
odersky fb1541a
Better printing of NamedTuple type trees
odersky cf09b19
Add FieldsOf type
odersky 4baa509
Describe and add tests for source incompabilities
odersky 702dcd5
Rename NamedTuple.FieldsOf --> NamedTuple.From
odersky 1e31d16
Implement Fields as a Selectable type member
odersky 22e6c89
Refactor typedSelect
odersky d0888f6
Add section on computable field names to reference doc page
odersky 69964b0
Fix fields as a selectable type member
odersky a3409e0
Make NamedTuple.From work for named tuple arguments
odersky 111674c
Fix NamedArg term/type classification
odersky 1fd5962
Rename inMode to withModeBits
odersky c0b792f
Revert NamedArg term/type classification
odersky 611861b
Update MimaFilters
odersky 640da16
Fix rebase breakage in Parsers.scala
odersky 67c0af2
Add tyql test case
odersky 2cd5d7e
Introduce auto-conversion from named tuples to tuples
odersky d8b7595
Update documentation following review suggestions
odersky e0eb247
Drop TreeInfo's `dropNamedArg`
odersky 4279a58
Print wildcard types in named tuples correctly
odersky c0bd1e4
Don't abbreviate tuple bindings if right-hand-side is named
odersky b997f3d
Strip named tuple from scrutinee when testing refutability of a named…
odersky 2206d88
Fix tuple selection in pattern matcher
odersky ca19f1a
Fixes to NamedTuple
odersky 984fe62
More tests
odersky 21bcfef
Mention restriction against `_1`, `_2`, ... as named tuple labels
odersky 92d22c9
Address review comments on Tuple.scala
odersky 1613ee1
Reject recursive dynamicSelect corner case
odersky a04d3a7
Update compiler/src/dotty/tools/dotc/typer/Typer.scala
odersky 37b1bd2
Update tests/neg/unselectable-fields.check
odersky 3f8f6c6
Use consistent naming and drop remaining braces in tuple type ops
EugeneFlesselle 9627c08
Add an infix shorthand for `Append[X, Y]`
EugeneFlesselle 8a4162f
Drop unreachable case from `type Zip`
EugeneFlesselle 0ab9e7b
Document `Concat` covariance in 2nd parameter
EugeneFlesselle 075b7d1
Refine bounds of `type Filter` predicate
EugeneFlesselle c58c8c2
Do `contains` runtime operation based on term equality
EugeneFlesselle 57b17ac
Do `indexOf` runtime operation based on term equality
EugeneFlesselle f427ec9
Do `filter` runtime operation based on a term level predicate
EugeneFlesselle 94b7c1f
Mark `type Append` 2nd argument as covariant
EugeneFlesselle 5df2120
Move `NonEmptyTuple` methods into `Tuple`
EugeneFlesselle 40c6138
Reorder operations to be same between term and type level
EugeneFlesselle 03509b8
Drop braces remaining at term level
EugeneFlesselle 9047ac3
Fix `def indexOf` to return the size instead of -1
EugeneFlesselle 579e14a
Revert doing tuple runtime operations based on a term level predicates
EugeneFlesselle 8d6fa37
Make named-tuples-strawman-2.scala a run test
EugeneFlesselle 1e29c4f
import language.experimental.namedTuples in pos/fieldsOf.scala
EugeneFlesselle 0c89c92
Undo all unnecessary changes to Tuples.
odersky f80a8dd
Revert the addition of `type Fields` in `Selectable`.
sjrd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Drop braces remaining at term level
- Loading branch information
commit 03509b8c09c519cc9fc8e5d9479ce939d23642bc
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.