Skip to content

#1401. [Patterns] Record pattern tests added #1580

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 8 commits into from
Dec 13, 2022

Conversation

sgrekhov
Copy link
Contributor

No description provided.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A handful of suggestions added.

// SharedOptions=--enable-experiment=patterns,records

main() {
var (:_) = (x1: 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! That's a counter-example to what I just said. ;-) So this test can be written.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we should keep it!

@sgrekhov sgrekhov requested a review from eernstg December 13, 2022 14:47
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thing needs to be clarified: Is LanguageFeatures/Patterns/record_A04_t01.dart testing something which is already being tested elsewhere?

@sgrekhov
Copy link
Contributor Author

Just one thing needs to be clarified: Is LanguageFeatures/Patterns/record_A04_t01.dart testing something which is already being tested elsewhere?

I don't think so. I removed this test from this PR but preserved it locally. There should be somewhere in the spec appropriate statement ("the initializing expression isn't assignable to this required type, hence the error") and I'll use it there

@sgrekhov sgrekhov requested a review from eernstg December 13, 2022 15:28
Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eernstg eernstg merged commit 929f5c1 into dart-lang:master Dec 13, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Dec 16, 2022
2022-12-14 [email protected] Fixes dart-lang/co19#1589. Fix wrong expectation in relational tests (dart-lang/co19#1594)
2022-12-14 [email protected] Fixes dart-lang/co19#1588. Fix testing of 'logical-and' subpattern (dart-lang/co19#1593)
2022-12-14 [email protected] dart-lang/co19#1587. Fix testing of 'logical-or' subpattern (dart-lang/co19#1592)
2022-12-14 [email protected] dart-lang/co19#1540. Tests error expectations updated (dart-lang/co19#1543)
2022-12-14 [email protected] dart-lang/co19#1596. Remove CyclicInitializationError from co19 tests (dart-lang/co19#1590)
2022-12-13 [email protected] dart-lang/co19#1401. [Patterns] Switch expressions fixed according to the new syntax (dart-lang/co19#1583)
2022-12-13 [email protected] dart-lang/co19#1401. [Patterns] Record pattern tests added (dart-lang/co19#1580)
2022-12-13 [email protected] dart-lang/co19#1581. Remove use of Deprecated.expires (dart-lang/co19#1584)
2022-12-13 49699333+dependabot[bot]@users.noreply.github.com Bump actions/setup-java from 3.6.0 to 3.8.0 (dart-lang/co19#1582)

Change-Id: I57f679a9cf6dc9063d5fdfcc630831a2a29abba0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275920
Commit-Queue: Erik Ernst <[email protected]>
Reviewed-by: Erik Ernst <[email protected]>
@sgrekhov sgrekhov deleted the co19-1401-records branch March 22, 2023 13:48
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