Skip to content

Confusing error message from dart2js on 'e || throw x'. #22926

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

Closed
lrhn opened this issue Mar 20, 2015 · 2 comments
Closed

Confusing error message from dart2js on 'e || throw x'. #22926

lrhn opened this issue Mar 20, 2015 · 2 comments
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug web-dart2js

Comments

@lrhn
Copy link
Member

lrhn commented Mar 20, 2015

Code like:
  (41 == 42) || throw "x";
gives an error saying:

Error: Expected an expression, but got 'throw'.
  41 == 42 || throw "not";
              ^^^^^

That makes it sound like "throw" is not an expression, where the problem is that it's not a LogicalAndExpression.

@floitschG
Copy link
Contributor

cc @johnniwinther.
Removed Priority-Unassigned label.
Added Priority-Low label.

@lrhn lrhn added Type-Enhancement P3 A lower priority bug or feature request web-dart2js labels Mar 22, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
@askeksa-google
Copy link

Same issue as #24891 with a different operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants