Asserts should allow full expressions #13401
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)
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.)
The text was updated successfully, but these errors were encountered: