-
Notifications
You must be signed in to change notification settings - Fork 28
#2477. Add match operators constants evaluation tests #2482
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.
Looks good! Just one thing: I think Language/Expressions/Constants/math_operators_A02_t02.dart needs to be adjusted in order to test a unary minus expression as a constant expression.
|
||
main() { | ||
const c1 = ExtNum(1); | ||
Expect.identical(-1, -c1); |
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.
But here, -c1
is not in a constant context so we won't get any errors even if it isn't considered constant. Maybe use const c1 = -ExtNum(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.
Similar comment on the other cases.
Indeed. Thank you! Updated |
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
2024-01-18 [email protected] dart-lang/co19#2477. Add test checking that an operator can be redeclared (dart-lang/co19#2495) 2024-01-18 [email protected] Fixes dart-lang/co19#2479. Delete outdated test co19/LibTest/ffi/sizeOf/sizeOf_A01_t02 (dart-lang/co19#2483) 2024-01-17 [email protected] dart-lang/co19#2485. Add constants `as T` tests (dart-lang/co19#2489) 2024-01-17 [email protected] dart-lang/co19#2477. Add more constant evaluation tests (dart-lang/co19#2484) 2024-01-17 [email protected] Fixes dart-lang/co19#2487. Add tests for type cast and type `void` (dart-lang/co19#2492) 2024-01-17 [email protected] Fixes dart-lang/co19#2486. `Pointer.elementAt` replaced by `+` operator (dart-lang/co19#2488) 2024-01-17 [email protected] Fixes dart-lang/co19#2491. Add test that an extension type cannot implement type `Never` (dart-lang/co19#2493) 2024-01-12 [email protected] dart-lang/co19#2477. Add match operators constants evaluation tests (dart-lang/co19#2482) Change-Id: I1dee628d4685b0b24296aaabfcf4abcb659fa765 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347240 Reviewed-by: Alexander Thomas <[email protected]> Reviewed-by: William Hesse <[email protected]>
No description provided.