Skip to content
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

Implement Q1 2021 features. Add/update co19 tests for "Allow >>> as overridable operator" #997

Closed
sgrekhov opened this issue Feb 10, 2021 · 3 comments
Assignees

Comments

@sgrekhov
Copy link
Contributor

Add/update co19 tests for "Allow >>> as overridable operator" feature. Specification

Meta-issue dart-lang/sdk#44911

@alexmarkov
Copy link

Expression a >>> b in case of b < 0 results in a compile-time error if that evaluation happens at compile time - in constant context. Otherwise, the expression is evaluated at run time and throws a run-time error.

The test co19/src/Language/Expressions/Shift/integer_t04.dart (and co19_2/src/Language/Expressions/Shift/integer_t04.dart) incorrectly expects compile-time errors when expressions are not constants.

@alexmarkov
Copy link

The tests co19/src/LanguageFeatures/nnbd/triple-shift/local_variable_read_A02_t03.dart and co19/src/LanguageFeatures/nnbd/weak/triple-shift/local_variable_read_A02_t03.dart have the following expectation:

  Expect.throws(() {x >>>= 2;});

This expectation doesn't look correct. Why would it throw an exception? Maybe it should use y instead of x.

@iarkh iarkh self-assigned this Feb 24, 2021
@iarkh iarkh closed this as completed Mar 10, 2021
@iarkh
Copy link
Contributor

iarkh commented Mar 10, 2021

Tests are already implemented in the Language and LanguageFeatures/Triple-Shift directories.

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

No branches or pull requests

3 participants