-
Notifications
You must be signed in to change notification settings - Fork 28
#2559. Add test that EnumName
extension is not augmentable
#2899
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.
LGTM
Expect.equals("name1", E1.name); | ||
Expect.equals("e0", E1.e0.name); | ||
Expect.equals("name2", E2.e0.name); | ||
Expect.equals("e0", E2.e0.name); |
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.
Very good!
The other thing I mentioned should perhaps be added to a more general enum
test: The name
extension instance getter cannot be invoked when there is a static member in the on-type with basename name
.
In general: An extension instance member named n
cannot be invoked when there is a static member in the on-type with the name id
or id=
where id
is the basename of n
.
We might have it, it just occurred to me that perhaps we don't. ;-)
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.
I can't find such tests. Which part of the spec contains this statement?
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.
https://github.com/dart-lang/language/blob/599534250d51b648030adfc7b48be9f00655d4ae/specification/dartLangSpec.tex#L6664, it says 'member' rather than 'instance member'.
2024-10-04 [email protected] Fixes dart-lang/co19#2919. Fix new roll failures (dart-lang/co19#2920) 2024-10-03 [email protected] dart-lang/co19#2915. Add missing extension in syntax_A03_t01.dart (dart-lang/co19#2918) 2024-10-03 [email protected] Fixes dart-lang/co19#2915. Fix errors and typos in some null-aware elements tests (dart-lang/co19#2917) 2024-10-03 [email protected] Fixes dart-lang/co19#2906. Add digit separators 'parse' tests (dart-lang/co19#2916) 2024-10-03 [email protected] Fixes dart-lang/co19#2907. Update expected errors positions in grammar_A03_t01.dart (dart-lang/co19#2914) 2024-10-02 [email protected] dart-lang/co19#2906. Add digit separators tests (dart-lang/co19#2910) 2024-10-02 [email protected] dart-lang/co19#2907. Revert wrong change in grammar_A04_t01_part1.dart (dart-lang/co19#2913) 2024-10-02 [email protected] Fixes dart-lang/co19#2907. Update expected errors positions in grammar_A04_t01_part1.dart (dart-lang/co19#2912) 2024-10-02 [email protected] Fixes dart-lang/co19#2909. Fix extension applicability tests according to the updated spec (dart-lang/co19#2911) 2024-10-01 49699333+dependabot[bot]@users.noreply.github.com Bump the github-actions group with 2 updates (dart-lang/co19#2908) 2024-10-01 [email protected] dart-lang/co19#2559. Add tests for adding body to static members (dart-lang/co19#2905) 2024-09-30 [email protected] Fixes dart-lang/co19#2902. Add tests for an extension applicability (dart-lang/co19#2903) 2024-09-30 [email protected] Fixes dart-lang/co19#2901. Update expected errors for analyzer and CFE (dart-lang/co19#2904) 2024-09-27 [email protected] dart-lang/co19#2559. Fix typo in augmenting_enum_values_A05_t05.dart (dart-lang/co19#2900) 2024-09-27 [email protected] dart-lang/co19#2559. Add test that `EnumName` extension is not augmentable (dart-lang/co19#2899) 2024-09-27 [email protected] dart-lang/co19#2559. Add more tests for augmenting enum members and values. (dart-lang/co19#2897) 2024-09-27 [email protected] dart-lang/co19#2825. Add more grammar and terminology tests (dart-lang/co19#2885) 2024-09-27 [email protected] dart-lang/co19#2559. Fix accidental syntax errors (dart-lang/co19#2898) Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try Change-Id: Id70baf6e0f6a6ea62eb0b507bffc3c1fb39e71ce Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388007 Commit-Queue: Erik Ernst <[email protected]> Reviewed-by: Erik Ernst <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
No description provided.