-
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-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Describe the issue
In some cases, a package may want one class to stop being used with generics.
For example, Riverpod refactored Ref<StateT> to just Ref.
This change is done with:
+@optionalTypeArgs
class Ref<
+ @deprecated
T> {}The problem is, existing references to the type parameter does not cause a warning.
To Reproduce
@optionalTypeArgs
class Ref<@deprecated T> {}
Ref<int>? value; Expected behavior
This should warn on <int> that the type parameter is deprecated
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-warningIssues with the analyzer's Warning codesIssues with the analyzer's Warning codestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)