-
Notifications
You must be signed in to change notification settings - Fork 28
#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
Conversation
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this 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?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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]>
No description provided.