-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-uxtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Given the following code:
void f({@deprecated required int c}) {}
void g() {
f(c: 2);
}The analyzer marks the argument named c as being deprecated claiming that it shouldn't be used, but the call site is required to provide a value. There's no way for the user to fix the diagnostic, so we probably shouldn't produce it.
On the other hand, we should probably have a diagnostic indicating that it doesn't make sense to have a parameter that's both deprecated and required and suggest that users remove required and either make the parameter nullable or provide a default value.
parlough, bernaferrari and jonasfj
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-uxtype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)