Skip to content

Commit

Permalink
linter: Remove deprecated DartTypeUtilities
Browse files Browse the repository at this point in the history
Change-Id: Iacfebcd6dbc9f30ae3ec01a6053dd92f938ad112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391481
Commit-Queue: Phil Quitslund <[email protected]>
Reviewed-by: Phil Quitslund <[email protected]>
Auto-Submit: Samuel Rawlins <[email protected]>
  • Loading branch information
srawlins authored and Commit Queue committed Oct 22, 2024
1 parent c96662c commit dacf5bc
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions pkg/linter/lib/src/util/dart_type_utilities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Expression> arguments,
NodeList<FormalParameter> parameters) =>
argumentsMatchParameters(arguments, parameters);
}

class InterfaceTypeDefinition {
final String name;
final String library;
Expand Down

0 comments on commit dacf5bc

Please sign in to comment.