-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Generalize assert syntax in specification #26866
Comments
Should we also update the specification to reflect the optional message that I believe is already supported by all of the platforms? |
Let's do this independently, but yes. |
Is the optional message supported anywhere? I don't think we ever agreed on a design. |
Analyzer supports an optional message (see #24217). According to #24213 it is also supported in dart2js and the formatter (though that issue was never updated to reflect that analyzer supports it). The discussion was around whether to require the second argument to be a |
... or not convert it at all, and keep it as-is in the |
Fixes issue #26866 BUG= http://dartbug.com/26866 R=eernst@google.com, floitsch@google.com Review URL: https://codereview.chromium.org/2143363002 .
Closing this because the commit message says it's fixed. GitHub's "auto-close" looks for certain strings like "Fixes #...", but "fixes issue #..." isn't one of them. :) |
With reference to #17682 for background, the language specification should be adjusted such that it uses the grammar rule
assertStatement: assert '(' expression ')' ';'
rather than the current one which uses
conditionalExpression
. The wording of the paragraph starting with 'The conditional expression e ..' in section 17.17 should be adjusted accordingly.The language team analysis of this issue is available at https://gist.github.com/eernstg/50a327addd96035d5393a507c0ea2d9a.
The text was updated successfully, but these errors were encountered: