Wire up use of deprecated export.

Bug:48997
Change-Id: I440fb8ebfe63ae785571f7927c5cdab625eee0cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325363
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This commit is contained in:
Keerti Parthasarathy 2023-09-11 23:24:19 +00:00 committed by Commit Queue
parent 02dba4189f
commit 4a04ec3201
3 changed files with 5 additions and 7 deletions

View file

@ -3439,13 +3439,9 @@ WarningCode.DEAD_CODE_CATCH_FOLLOWING_CATCH:
WarningCode.DEAD_CODE_ON_CATCH_SUBTYPE:
status: hasFix
WarningCode.DEPRECATED_EXPORT_USE:
status: needsFix
status: hasFix
notes: |-
Low priority, because this is likely not encountered often.
The fix is to look for a non-deprecated way to import the name and to add a
new import for it. It might be possible to remove the old import if all of
the names being imported through it are available through the new import.
A data driven fix using `replacedBy`.
WarningCode.DEPRECATED_EXTENDS_FUNCTION:
status: needsFix
notes: |-

View file

@ -989,6 +989,9 @@ class FixProcessor extends BaseProcessor {
CompileTimeErrorCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD: [
DataDriven.new,
],
WarningCode.DEPRECATED_EXPORT_USE: [
DataDriven.new,
],
HintCode.DEPRECATED_MEMBER_USE: [
DataDriven.new,
],

View file

@ -15,7 +15,6 @@ void main() {
@reflectiveTest
class TestUseCaseTest extends DataDrivenFixProcessorTest {
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/23067')
Future<void> test_expect_export_deprecated() async {
newFile('$workspaceRootPath/p/lib/lib.dart', '''
library p;