-
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
Possible bug in diagnostics for doNotSubmit
#55558
Comments
Not necessarily a bug but then definitely documentation that's missing; inevitably code marked I know there is similar permissiveness in other annotations, so if that seems fine I'll send a patch to update the docs. It also wouldn't be a huge change to enforce same library violations at this point. |
@srawlins thoughts? |
I like the sentiment that But that exact shape might not be helpful here. Do you know, specifically for |
I think that, for say: void test({@doNotSubmit bool solo = false}) {
if (solo) { ... }
} ... this should work out of the box (and does today). The question is if this should be flagged: void test({@doNotSubmit bool solo = false}) {}
// Same library.
void megaTest() {
test(solo: true);
} |
What is the use case for allowing it to be executed outside of another function that's also marked as If there isn't one, it might be better to be more restrictive in v1 and to relax it when we have a use case. Making a check like this more restrictive can be a huge breaking change, and sometimes impossible. |
I'm fine with that. Let me take this bug to increase the restrictive nature of the annotation. |
Bug: #55558 Change-Id: Ib0aa786e81e6fc9fecc8af7a3edbbd541cabcaad Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364382 Commit-Queue: Matan Lurey <matanl@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Sam Rawlins <srawlins@google.com>
I expected to have a diagnostic produced by the following code, but there is none.
Should there be one?
The text was updated successfully, but these errors were encountered: