-
Notifications
You must be signed in to change notification settings - Fork 28
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
#2976. Add equality tests. Part 1. #3021
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.
Looks good, noted one typo (in a few sentences that are similar).
Another thing came to mind, for a different PR if that's more convenient:
It may look like an oversight that the patterns == e
and != e
allow e
to be a <staticMemberShorthand>
because this allows for <selector>*
at the end, and we almost never have a constant expression when this sequence of <selector>
is non-empty.
However, we can do a few things: == 'Hello'.length
should be supported. So we should now be able to do == .aString.length
as well. Similarly, == .myGenericStaticMethod<int>
should be possible. It is probably a tricky exercise to find a suitable context type such that the comparison will be non-trivial, but it shouldn't be a big problem even if unrelated_type_equality_checks
will complain.
There may be more, but I can't immediately come up with any other examples. Perhaps there would be some extra ones popping up by looking at the language specification section about constant expressions.
Thank you! Descriptions are updated. I'll add constants with non-empty selectors in a separate PR |
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, thanks!
2024-12-19 sgrekhov22@gmail.com dart-lang/co19#2976. Add equality tests. Part 1. (dart-lang/co19#3021) 2024-12-19 sgrekhov22@gmail.com dart-lang/co19#2559. Add more augmented expression tests for class-like declarations (dart-lang/co19#3019) 2024-12-18 sgrekhov22@gmail.com Fix Finalizer_A01_t04.dart test (dart-lang/co19#3020) 2024-12-18 sgrekhov22@gmail.com dart-lang/co19#2559. Fix metadata tests (dart-lang/co19#3018) 2024-12-17 sgrekhov22@gmail.com dart-lang/co19#2559. Add metadata tests. Part 1. (dart-lang/co19#3017) 2024-12-16 sgrekhov22@gmail.com dart-lang/co19#2559. Add more augmented expression tests (dart-lang/co19#3016) 2024-12-16 sgrekhov22@gmail.com dart-lang/co19#2559. Add tests for reserved word `augmented` in constructors. Part 2. (dart-lang/co19#3015) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: Idf2d4813fdca6d4107ee17d508cf5f8b27b1b4ff Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401882 Commit-Queue: Alexander Thomas <athom@google.com> Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
No description provided.