Skip to content

#1401. [Patterns] Object pattern tests #1602

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 7 commits into from
Dec 20, 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.

This one is heavy! ;-)

Anyway, I added a few comments about apparent issues.

The most interesting one is the one which is described in dart-lang/language#2698 in the section "'Wrapped in a unary pattern' to broad?".

The point is that we can't have any primaryPatterns when the feature spec says that we can wrap a variable pattern in a unary pattern, in spite of the fact that unaryPattern derives primaryPattern.

But I think the only adjustment that makes sense is to eliminate primaryPattern (so we can wrap a variable pattern in any unaryPattern which isn't a primary pattern).

Let's assume that, and expect errors when that rule is violated (especially: when there is a parenthesized pattern like case Square(: (size s)):).

If somebody really insists on interpreting this in a different way then we'll have the discussion, and we need to have that anyway.

Copy link
Contributor Author

@sgrekhov sgrekhov left a comment

Choose a reason for hiding this comment

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

This one is heavy! ;-)

I know! :) Thank you! Let's finish with it before holidays :) Please review once again

@sgrekhov sgrekhov requested a review from eernstg December 20, 2022 18:29
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 f4bd100 into dart-lang:master Dec 20, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Dec 21, 2022
2022-12-20 [email protected] dart-lang/co19#1401. [Patterns] Object pattern tests (dart-lang/co19#1602)
2022-12-20 [email protected] Fixes dart-lang/co19#1539. Rename "views" experimental flag to "inline-class" (dart-lang/co19#1596)
2022-12-20 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/co19#1607)
2022-12-20 49699333+dependabot[bot]@users.noreply.github.com Bump actions/setup-java from 3.8.0 to 3.9.0 (dart-lang/co19#1608)
2022-12-19 [email protected] dart-lang/co19#1604. Update errors expectations for metadata parsing (dart-lang/co19#1605)
2022-12-19 [email protected] Fixes dart-lang/co19#1601. Expect compile-time error for elementAt() invocation on not a constant (dart-lang/co19#1603)
2022-12-16 [email protected] dart-lang/co19#1599. Expect TypeError in place of NullThrownError in co19 tests (dart-lang/co19#1600)

Change-Id: I490806d7116f66dc294921561bdec350039e44f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276901
Reviewed-by: Alexander Thomas <[email protected]>
@sgrekhov sgrekhov deleted the co19-1401-objects 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