From dacf5bc8c681ce2d728e00bb3355ec99f8656b29 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 22 Oct 2024 17:49:39 +0000 Subject: [PATCH] linter: Remove deprecated DartTypeUtilities Change-Id: Iacfebcd6dbc9f30ae3ec01a6053dd92f938ad112 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391481 Commit-Queue: Phil Quitslund Reviewed-by: Phil Quitslund Auto-Submit: Samuel Rawlins --- .../lib/src/util/dart_type_utilities.dart | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/pkg/linter/lib/src/util/dart_type_utilities.dart b/pkg/linter/lib/src/util/dart_type_utilities.dart index ebd77d4d26ad..5ae62d34d9d2 100644 --- a/pkg/linter/lib/src/util/dart_type_utilities.dart +++ b/pkg/linter/lib/src/util/dart_type_utilities.dart @@ -208,37 +208,6 @@ bool _isFunctionTypeUnrelatedToType(FunctionType type1, DartType type2) { typedef AstNodePredicate = bool Function(AstNode node); -class DartTypeUtilities { - @Deprecated('Replace with `type.extendsClass`') - static bool extendsClass( - DartType? type, String? className, String? library) => - type.extendsClass(className, library!); - - @Deprecated('Replace with `rawNode.canonicalElement`') - static Element? getCanonicalElementFromIdentifier(AstNode? rawNode) => - rawNode.canonicalElement; - - @Deprecated('Replace with `type.implementsInterface`') - static bool implementsInterface( - DartType? type, String interface, String library) => - type.implementsInterface(interface, library); - - // TODO(pq): remove and replace w/ an extension (pending internal migration) - @Deprecated('Slated for removal') - static bool isClass(DartType? type, String? className, String? library) => - type is InterfaceType && - type.element.name == className && - type.element.library.name == library; - - @Deprecated('Replace with `expression.isNullLiteral`') - static bool isNullLiteral(Expression? expression) => expression.isNullLiteral; - - @Deprecated('Use `argumentsMatchParameters`') - static bool matchesArgumentsWithParameters(NodeList arguments, - NodeList parameters) => - argumentsMatchParameters(arguments, parameters); -} - class InterfaceTypeDefinition { final String name; final String library;