avoid nested deprecation errors #8131
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
We currently get a deprecation warning/error for every deprecated symbol reachable from main. Would it be possible to only show the deprecation messages that are not covered by another deprecation message?
For example, in this code:
const deprecated = null;
@deprecated
bar() => null;
@deprecated
foo() => bar();
main() {
foo();
}
It would be great if the warning is only shown when calling 'foo', but not where 'foo' is calling 'bar'.
Another example is in dart:html. The 'on' getter is deprecated, and every class returned by 'on' is as well. If a program uses 'on', today they get an error for every one of those classes inside of 'dart:html'.
This is exposing errors from inside 'dart:html' are not relevant for the end user.
The text was updated successfully, but these errors were encountered: