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

Address a bunch of records issues. #2422

Merged
merged 6 commits into from
Aug 25, 2022
Merged

Address a bunch of records issues. #2422

merged 6 commits into from
Aug 25, 2022

Conversation

munificent
Copy link
Member

cc @eernstg @stereotype441 @jakemac53 @natebosch @kallentu @mit-mit

- Support constant records. Fix #2337.
- Support empty and one-positional-field records. Fix #2386.
- Re-add support for positional field getters Fix #2388.
- Specify the behavior of `toString()`. Fix #2389.
- Disambiguate record types in `on` clauses. Fix #2406.
@munificent
Copy link
Member Author

I just saw #2413, so I'll take a look at that and see if that makes more sense that my rudimentary const support in this PR.

munificent referenced this pull request Aug 20, 2022
- Remove the reflective static members on `Record`.
- Remove support for single positional element records.
- Remove synthesized getters for positional fields.

Close #1275.
Close #1277.
Close #1291.
# Conflicts:
#	working/0546-patterns/records-feature-specification.md
There should be no meaningful changes. I just:

- Fixed some misspellings.
- Used Markdown style consistent with the rest of the doc.
- Re-worded things to, I hope, read a little more naturally.
- Removed the parenthetical on identical() in a const context because
  that felt a little too academic.
@munificent
Copy link
Member Author

I'm going to go ahead and land this because it has changes that the implementation teams will want to take into account. Please don't hesitate to file issues if there are pieces of this you don't agree with. I'm trying to land and iterate in order to make progress. :)

@munificent munificent merged commit 5311b0b into master Aug 25, 2022
@munificent munificent deleted the record-updates branch August 25, 2022 21:52
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 6, 2022
This change is needed as a consequence of
dart-lang/language#2422
where `()` was introduced as the syntax for the empty record as well
as the empty record type.

Change-Id: Ia8b3f590361343ca14355043c5898e7bd084c04e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261645
Reviewed-by: William Hesse <[email protected]>
Auto-Submit: Erik Ernst <[email protected]>
Commit-Queue: William Hesse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants