Skip to content

Asserts should allow full expressions #13401

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
bwilkerson opened this issue Sep 18, 2013 · 2 comments
Closed

Asserts should allow full expressions #13401

bwilkerson opened this issue Sep 18, 2013 · 2 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@bwilkerson
Copy link
Member

The grammar for the assert statement currently restricts the contained expression to be a "conditionalExpression" rather than a full "expression". I don't think there's any value to this because you can get around it by parenthesizing any arbitrary expression. Please allow full expressions without requiring parentheses. (I believe both dart2js and the VM currently allow a full expression.)

@gbracha
Copy link
Contributor

gbracha commented Sep 18, 2013

Added Accepted label.

@bwilkerson bwilkerson added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Sep 18, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@munificent
Copy link
Member

Duplicate of #26865 (which is done).

@munificent munificent added the closed-duplicate Closed in favor of an existing report label Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). closed-duplicate Closed in favor of an existing report type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants