Do not rename method parameter names in overrides
Change-Id: I8c2f91a56c767c89dc4d0bea22b64dec147870c4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237852 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
@@ -15,10 +15,10 @@ class CharacterLocation {
|
||||
CharacterLocation(this.lineNumber, this.columnNumber);
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is CharacterLocation &&
|
||||
lineNumber == object.lineNumber &&
|
||||
columnNumber == object.columnNumber;
|
||||
bool operator ==(Object other) =>
|
||||
other is CharacterLocation &&
|
||||
lineNumber == other.lineNumber &&
|
||||
columnNumber == other.columnNumber;
|
||||
|
||||
@override
|
||||
String toString() => '$lineNumber:$columnNumber';
|
||||
|
||||
@@ -58,8 +58,8 @@ class AdjacentStringsImpl extends StringLiteralImpl implements AdjacentStrings {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitAdjacentStrings(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitAdjacentStrings(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitAdjacentStrings(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -460,8 +460,8 @@ class AsExpressionImpl extends ExpressionImpl implements AsExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitAsExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitAsExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitAsExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -710,8 +710,8 @@ class AssignmentExpressionImpl extends ExpressionImpl
|
||||
visitor.visitAssignmentExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitAssignmentExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitAssignmentExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -721,8 +721,8 @@ class AssignmentExpressionImpl extends ExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) =>
|
||||
identical(child, _leftHandSide);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, _leftHandSide);
|
||||
}
|
||||
|
||||
/// A node in the AST structure for a Dart program.
|
||||
@@ -889,8 +889,8 @@ class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitAwaitExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitAwaitExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitAwaitExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -962,8 +962,8 @@ class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitBinaryExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitBinaryExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitBinaryExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1124,8 +1124,8 @@ class BooleanLiteralImpl extends LiteralImpl implements BooleanLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitBooleanLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitBooleanLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitBooleanLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1260,8 +1260,8 @@ class CascadeExpressionImpl extends ExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitCascadeExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitCascadeExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitCascadeExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -2339,8 +2339,8 @@ class ConditionalExpressionImpl extends ExpressionImpl
|
||||
visitor.visitConditionalExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitConditionalExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitConditionalExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -2846,8 +2846,8 @@ class ConstructorReferenceImpl extends CommentReferableExpressionImpl
|
||||
visitor.visitConstructorReference(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitConstructorReference(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitConstructorReference(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -3336,8 +3336,8 @@ class DoubleLiteralImpl extends LiteralImpl implements DoubleLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitDoubleLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitDoubleLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitDoubleLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -5332,8 +5332,8 @@ class FunctionExpressionImpl extends ExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitFunctionExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitFunctionExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitFunctionExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -5399,8 +5399,8 @@ class FunctionExpressionInvocationImpl extends InvocationExpressionImpl
|
||||
visitor.visitFunctionExpressionInvocation(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitFunctionExpressionInvocation(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitFunctionExpressionInvocation(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -5411,7 +5411,8 @@ class FunctionExpressionInvocationImpl extends InvocationExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) => identical(child, _function);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, _function);
|
||||
}
|
||||
|
||||
/// An expression representing a reference to a function, possibly with type
|
||||
@@ -5464,8 +5465,8 @@ class FunctionReferenceImpl extends CommentReferableExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitFunctionReference(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitFunctionReference(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitFunctionReference(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -6526,8 +6527,8 @@ class IndexExpressionImpl extends ExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitIndexExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitIndexExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -6537,7 +6538,8 @@ class IndexExpressionImpl extends ExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) => identical(child, _target);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, _target);
|
||||
}
|
||||
|
||||
/// An instance creation expression.
|
||||
@@ -6639,8 +6641,8 @@ class InstanceCreationExpressionImpl extends ExpressionImpl
|
||||
visitor.visitInstanceCreationExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitInstanceCreationExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitInstanceCreationExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -6701,8 +6703,8 @@ class IntegerLiteralImpl extends LiteralImpl implements IntegerLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitIntegerLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitIntegerLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitIntegerLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -6977,8 +6979,8 @@ class IsExpressionImpl extends ExpressionImpl implements IsExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitIsExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitIsExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitIsExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -7276,8 +7278,8 @@ class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitListLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitListLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitListLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -7696,8 +7698,8 @@ class MethodInvocationImpl extends InvocationExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitMethodInvocation(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitMethodInvocation(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitMethodInvocation(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -7709,7 +7711,8 @@ class MethodInvocationImpl extends InvocationExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) => identical(child, _target);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, _target);
|
||||
}
|
||||
|
||||
/// The declaration of a mixin.
|
||||
@@ -8205,13 +8208,13 @@ class NodeListImpl<E extends AstNode> with ListMixin<E> implements NodeList<E> {
|
||||
}
|
||||
|
||||
@override
|
||||
void add(E node) {
|
||||
insert(length, node);
|
||||
void add(E element) {
|
||||
insert(length, element);
|
||||
}
|
||||
|
||||
@override
|
||||
void addAll(Iterable<E> nodes) {
|
||||
for (E node in nodes) {
|
||||
void addAll(Iterable<E> iterable) {
|
||||
for (E node in iterable) {
|
||||
_elements.add(node);
|
||||
_owner._becomeParentOf(node as AstNodeImpl);
|
||||
}
|
||||
@@ -8223,9 +8226,9 @@ class NodeListImpl<E extends AstNode> with ListMixin<E> implements NodeList<E> {
|
||||
}
|
||||
|
||||
@override
|
||||
void insert(int index, E node) {
|
||||
_elements.insert(index, node);
|
||||
_owner._becomeParentOf(node as AstNodeImpl);
|
||||
void insert(int index, E element) {
|
||||
_elements.insert(index, element);
|
||||
_owner._becomeParentOf(element as AstNodeImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8389,8 +8392,8 @@ class NullLiteralImpl extends LiteralImpl implements NullLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitNullLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitNullLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitNullLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8531,8 +8534,8 @@ class ParenthesizedExpressionImpl extends ExpressionImpl
|
||||
visitor.visitParenthesizedExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitParenthesizedExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitParenthesizedExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8734,8 +8737,8 @@ class PostfixExpressionImpl extends ExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitPostfixExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitPostfixExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitPostfixExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8744,7 +8747,8 @@ class PostfixExpressionImpl extends ExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) => identical(child, operand);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, operand);
|
||||
}
|
||||
|
||||
/// An identifier that is prefixed or an access to an object property where the
|
||||
@@ -8825,8 +8829,8 @@ class PrefixedIdentifierImpl extends IdentifierImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitPrefixedIdentifier(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitPrefixedIdentifier(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitPrefixedIdentifier(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8904,8 +8908,8 @@ class PrefixExpressionImpl extends ExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitPrefixExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitPrefixExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitPrefixExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -8914,8 +8918,8 @@ class PrefixExpressionImpl extends ExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) =>
|
||||
identical(child, operand) && operator.type.isIncrementOperator;
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, operand) && operator.type.isIncrementOperator;
|
||||
}
|
||||
|
||||
/// The access of a property of an object.
|
||||
@@ -9023,8 +9027,8 @@ class PropertyAccessImpl extends CommentReferableExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitPropertyAccess(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitPropertyAccess(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitPropertyAccess(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -9034,7 +9038,8 @@ class PropertyAccessImpl extends CommentReferableExpressionImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool _extendsNullShorting(Expression child) => identical(child, _target);
|
||||
bool _extendsNullShorting(Expression descendant) =>
|
||||
identical(descendant, _target);
|
||||
}
|
||||
|
||||
/// The invocation of a constructor in the same class from within a
|
||||
@@ -9144,8 +9149,8 @@ class RethrowExpressionImpl extends ExpressionImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitRethrowExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitRethrowExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitRethrowExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -9748,8 +9753,8 @@ class SimpleIdentifierImpl extends IdentifierImpl implements SimpleIdentifier {
|
||||
}
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitSimpleIdentifier(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitSimpleIdentifier(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -9827,8 +9832,8 @@ class SimpleStringLiteralImpl extends SingleStringLiteralImpl
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitSimpleStringLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitSimpleStringLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitSimpleStringLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -10238,8 +10243,8 @@ class SuperExpressionImpl extends ExpressionImpl implements SuperExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitSuperExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitSuperExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitSuperExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -10622,8 +10627,8 @@ class SymbolLiteralImpl extends LiteralImpl implements SymbolLiteral {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitSymbolLiteral(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitSymbolLiteral(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitSymbolLiteral(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -10661,8 +10666,8 @@ class ThisExpressionImpl extends ExpressionImpl implements ThisExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitThisExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitThisExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitThisExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -10715,8 +10720,8 @@ class ThrowExpressionImpl extends ExpressionImpl implements ThrowExpression {
|
||||
E? accept<E>(AstVisitor<E> visitor) => visitor.visitThrowExpression(this);
|
||||
|
||||
@override
|
||||
void resolveExpression(ResolverVisitor visitor, DartType? contextType) {
|
||||
visitor.visitThrowExpression(this, contextType: contextType);
|
||||
void resolveExpression(ResolverVisitor resolver, DartType? contextType) {
|
||||
resolver.visitThrowExpression(this, contextType: contextType);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -48,8 +48,8 @@ class BoolState extends InstanceState {
|
||||
String get typeName => "bool";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is BoolState && identical(value, object.value);
|
||||
bool operator ==(Object other) =>
|
||||
other is BoolState && identical(value, other.value);
|
||||
|
||||
@override
|
||||
BoolState convertToBool() => this;
|
||||
@@ -211,10 +211,10 @@ class DartObjectImpl implements DartObject {
|
||||
List<DartType>? get typeArguments => (_state as FunctionState)._typeArguments;
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is DartObjectImpl) {
|
||||
return _typeSystem.runtimeTypesEqual(type, object.type) &&
|
||||
_state == object._state;
|
||||
bool operator ==(Object other) {
|
||||
if (other is DartObjectImpl) {
|
||||
return _typeSystem.runtimeTypesEqual(type, other.type) &&
|
||||
_state == other._state;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -979,8 +979,8 @@ class DoubleState extends NumState {
|
||||
String get typeName => "double";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is DoubleState && (value == object.value);
|
||||
bool operator ==(Object other) =>
|
||||
other is DoubleState && (value == other.value);
|
||||
|
||||
@override
|
||||
NumState add(InstanceState rightOperand) {
|
||||
@@ -1289,22 +1289,22 @@ class FunctionState extends InstanceState {
|
||||
String get typeName => "Function";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is! FunctionState) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is! FunctionState) {
|
||||
return false;
|
||||
}
|
||||
if (_element != object._element) {
|
||||
if (_element != other._element) {
|
||||
return false;
|
||||
}
|
||||
var typeArguments = _typeArguments;
|
||||
var otherTypeArguments = object._typeArguments;
|
||||
var otherTypeArguments = other._typeArguments;
|
||||
if (typeArguments == null || otherTypeArguments == null) {
|
||||
return typeArguments == null && otherTypeArguments == null;
|
||||
}
|
||||
if (typeArguments.length != otherTypeArguments.length) {
|
||||
return false;
|
||||
}
|
||||
if (_viaTypeAlias != object._viaTypeAlias) {
|
||||
if (_viaTypeAlias != other._viaTypeAlias) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < typeArguments.length; i++) {
|
||||
@@ -1412,18 +1412,18 @@ class GenericState extends InstanceState {
|
||||
String get typeName => "user defined type";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is GenericState) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is GenericState) {
|
||||
HashSet<String> otherFields =
|
||||
HashSet<String>.from(object._fieldMap.keys.toSet());
|
||||
HashSet<String>.from(other._fieldMap.keys.toSet());
|
||||
for (String fieldName in _fieldMap.keys.toSet()) {
|
||||
if (_fieldMap[fieldName] != object._fieldMap[fieldName]) {
|
||||
if (_fieldMap[fieldName] != other._fieldMap[fieldName]) {
|
||||
return false;
|
||||
}
|
||||
otherFields.remove(fieldName);
|
||||
}
|
||||
for (String fieldName in otherFields) {
|
||||
if (object._fieldMap[fieldName] != _fieldMap[fieldName]) {
|
||||
if (other._fieldMap[fieldName] != _fieldMap[fieldName]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1897,8 +1897,7 @@ class IntState extends NumState {
|
||||
String get typeName => "int";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is IntState && (value == object.value);
|
||||
bool operator ==(Object other) => other is IntState && (value == other.value);
|
||||
|
||||
@override
|
||||
NumState add(InstanceState rightOperand) {
|
||||
@@ -2322,9 +2321,9 @@ class ListState extends InstanceState {
|
||||
String get typeName => "List";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is ListState) {
|
||||
List<DartObjectImpl> otherElements = object._elements;
|
||||
bool operator ==(Object other) {
|
||||
if (other is ListState) {
|
||||
List<DartObjectImpl> otherElements = other._elements;
|
||||
int count = _elements.length;
|
||||
if (otherElements.length != count) {
|
||||
return false;
|
||||
@@ -2395,9 +2394,9 @@ class MapState extends InstanceState {
|
||||
String get typeName => "Map";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is MapState) {
|
||||
Map<DartObjectImpl, DartObjectImpl> otherElements = object._entries;
|
||||
bool operator ==(Object other) {
|
||||
if (other is MapState) {
|
||||
Map<DartObjectImpl, DartObjectImpl> otherElements = other._entries;
|
||||
int count = _entries.length;
|
||||
if (otherElements.length != count) {
|
||||
return false;
|
||||
@@ -2468,7 +2467,7 @@ class NullState extends InstanceState {
|
||||
String get typeName => "Null";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => object is NullState;
|
||||
bool operator ==(Object other) => other is NullState;
|
||||
|
||||
@override
|
||||
BoolState convertToBool() {
|
||||
@@ -2532,10 +2531,10 @@ class SetState extends InstanceState {
|
||||
String get typeName => "Set";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is SetState) {
|
||||
bool operator ==(Object other) {
|
||||
if (other is SetState) {
|
||||
List<DartObjectImpl> elements = _elements.toList();
|
||||
List<DartObjectImpl> otherElements = object._elements.toList();
|
||||
List<DartObjectImpl> otherElements = other._elements.toList();
|
||||
int count = elements.length;
|
||||
if (otherElements.length != count) {
|
||||
return false;
|
||||
@@ -2608,8 +2607,8 @@ class StringState extends InstanceState {
|
||||
String get typeName => "String";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is StringState && (value == object.value);
|
||||
bool operator ==(Object other) =>
|
||||
other is StringState && (value == other.value);
|
||||
|
||||
@override
|
||||
StringState concatenate(InstanceState rightOperand) {
|
||||
@@ -2677,8 +2676,8 @@ class SymbolState extends InstanceState {
|
||||
String get typeName => "Symbol";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is SymbolState && (value == object.value);
|
||||
bool operator ==(Object other) =>
|
||||
other is SymbolState && (value == other.value);
|
||||
|
||||
@override
|
||||
StringState convertToString() {
|
||||
@@ -2728,8 +2727,8 @@ class TypeState extends InstanceState {
|
||||
String get typeName => "Type";
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is TypeState && (_type == object._type);
|
||||
bool operator ==(Object other) =>
|
||||
other is TypeState && (_type == other._type);
|
||||
|
||||
@override
|
||||
StringState convertToString() {
|
||||
|
||||
@@ -1189,8 +1189,8 @@ class CompilationUnitElementImpl extends UriReferencedElementImpl
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is CompilationUnitElementImpl && source == object.source;
|
||||
bool operator ==(Object other) =>
|
||||
other is CompilationUnitElementImpl && source == other.source;
|
||||
|
||||
@override
|
||||
T? accept<T>(ElementVisitor<T> visitor) =>
|
||||
@@ -2416,13 +2416,11 @@ abstract class ElementImpl implements Element {
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (identical(this, object)) {
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
return object is Element &&
|
||||
object.kind == kind &&
|
||||
object.location == location;
|
||||
return other is Element && other.kind == kind && other.location == location;
|
||||
}
|
||||
|
||||
/// Append a textual representation of this element to the given [builder].
|
||||
@@ -2622,12 +2620,12 @@ class ElementLocationImpl implements ElementLocation {
|
||||
int get hashCode => Object.hashAll(_components);
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (identical(this, object)) {
|
||||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if (object is ElementLocationImpl) {
|
||||
List<String> otherComponents = object._components;
|
||||
if (other is ElementLocationImpl) {
|
||||
List<String> otherComponents = other._components;
|
||||
int length = _components.length;
|
||||
if (otherComponents.length != length) {
|
||||
return false;
|
||||
|
||||
@@ -81,16 +81,16 @@ class LeastGreatestClosureHelper extends ReplacementVisitor {
|
||||
}
|
||||
|
||||
@override
|
||||
DartType? visitTypeParameterType(TypeParameterType node) {
|
||||
if (eliminationTargets.contains(node.element)) {
|
||||
DartType? visitTypeParameterType(TypeParameterType type) {
|
||||
if (eliminationTargets.contains(type.element)) {
|
||||
var replacement = _typeParameterReplacement as TypeImpl;
|
||||
return replacement.withNullability(
|
||||
uniteNullabilities(
|
||||
replacement.nullabilitySuffix,
|
||||
node.nullabilitySuffix,
|
||||
type.nullabilitySuffix,
|
||||
),
|
||||
);
|
||||
}
|
||||
return super.visitTypeParameterType(node);
|
||||
return super.visitTypeParameterType(type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class DynamicTypeImpl extends TypeImpl implements DynamicType {
|
||||
NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.none;
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => identical(object, this);
|
||||
bool operator ==(Object other) => identical(other, this);
|
||||
|
||||
@override
|
||||
R accept<R>(TypeVisitor<R> visitor) {
|
||||
@@ -918,7 +918,7 @@ class NeverTypeImpl extends TypeImpl implements NeverType {
|
||||
String get name => 'Never';
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => identical(object, this);
|
||||
bool operator ==(Object other) => identical(other, this);
|
||||
|
||||
@override
|
||||
R accept<R>(TypeVisitor<R> visitor) {
|
||||
@@ -1043,7 +1043,7 @@ abstract class TypeImpl implements DartType {
|
||||
void appendTo(ElementDisplayStringBuilder builder);
|
||||
|
||||
@override
|
||||
InterfaceType? asInstanceOf(ClassElement element) => null;
|
||||
InterfaceType? asInstanceOf(ClassElement targetElement) => null;
|
||||
|
||||
@override
|
||||
String getDisplayString({
|
||||
@@ -1192,8 +1192,8 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
|
||||
}
|
||||
|
||||
@override
|
||||
InterfaceType? asInstanceOf(ClassElement element) {
|
||||
return bound.asInstanceOf(element);
|
||||
InterfaceType? asInstanceOf(ClassElement targetElement) {
|
||||
return bound.asInstanceOf(targetElement);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1261,7 +1261,7 @@ class VoidTypeImpl extends TypeImpl implements VoidType {
|
||||
NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.none;
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => identical(object, this);
|
||||
bool operator ==(Object other) => identical(other, this);
|
||||
|
||||
@override
|
||||
R accept<R>(TypeVisitor<R> visitor) {
|
||||
|
||||
@@ -35,7 +35,7 @@ class UnknownInferredType extends TypeImpl {
|
||||
NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.star;
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => identical(object, this);
|
||||
bool operator ==(Object other) => identical(other, this);
|
||||
|
||||
@override
|
||||
R accept<R>(TypeVisitor<R> visitor) {
|
||||
|
||||
@@ -51,11 +51,11 @@ class CiderSearchMatch {
|
||||
CiderSearchMatch(this.path, this.startPositions);
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) =>
|
||||
object is CiderSearchMatch &&
|
||||
path == object.path &&
|
||||
bool operator ==(Object other) =>
|
||||
other is CiderSearchMatch &&
|
||||
path == other.path &&
|
||||
const ListEquality<CharacterLocation?>()
|
||||
.equals(startPositions, object.startPositions);
|
||||
.equals(startPositions, other.startPositions);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
@@ -84,6 +84,11 @@ import 'package:analyzer/src/summary2/ast_binary_tokens.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
|
||||
// Many of the super-types in this file come from 'package:_fe_analyzer_shared'
|
||||
// and we've chosen more specific / meaningful parameter names. Leaving these as
|
||||
// they are for now.
|
||||
// ignore_for_file: avoid_renaming_method_parameters
|
||||
|
||||
const _invalidCollectionElement = _InvalidCollectionElement._();
|
||||
|
||||
/// A parser listener that builds the analyzer's AST structure.
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class BasicSource extends Source {
|
||||
String get shortName => pathos.basename(fullName);
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) => object is Source && object.uri == uri;
|
||||
bool operator ==(Object other) => other is Source && other.uri == uri;
|
||||
}
|
||||
|
||||
/// Instances of the class `DartUriResolver` resolve `dart` URI's.
|
||||
@@ -241,7 +241,7 @@ abstract class Source {
|
||||
/// source code as this source
|
||||
/// See [Object.==].
|
||||
@override
|
||||
bool operator ==(Object object);
|
||||
bool operator ==(Object other);
|
||||
|
||||
/// Return `true` if this source exists.
|
||||
///
|
||||
|
||||
@@ -50,8 +50,8 @@ class LimitedQueue<E> extends ListQueue<E> {
|
||||
LimitedQueue(this.limit);
|
||||
|
||||
@override
|
||||
void add(E o) {
|
||||
super.add(o);
|
||||
void add(E value) {
|
||||
super.add(value);
|
||||
while (length > limit) {
|
||||
remove(first);
|
||||
}
|
||||
|
||||
@@ -99,11 +99,11 @@ class FileSource extends Source {
|
||||
UriKind get uriKind => UriKind.fromScheme(uri.scheme);
|
||||
|
||||
@override
|
||||
bool operator ==(Object object) {
|
||||
if (object is FileSource) {
|
||||
return id == object.id;
|
||||
} else if (object is Source) {
|
||||
return uri == object.uri;
|
||||
bool operator ==(Object other) {
|
||||
if (other is FileSource) {
|
||||
return id == other.id;
|
||||
} else if (other is Source) {
|
||||
return uri == other.uri;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -627,9 +627,9 @@ abstract class TableReader<T> extends Reader<T> {
|
||||
T createObject(BufferContext bc, int offset);
|
||||
|
||||
@override
|
||||
T read(BufferContext bp, int offset) {
|
||||
int objectOffset = bp.derefObject(offset);
|
||||
return createObject(bp, objectOffset);
|
||||
T read(BufferContext bc, int offset) {
|
||||
int objectOffset = bc.derefObject(offset);
|
||||
return createObject(bc, objectOffset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@ class GnWorkspace extends Workspace {
|
||||
}
|
||||
|
||||
@override
|
||||
WorkspacePackage? findPackageFor(String path) {
|
||||
var startFolder = provider.getFolder(path);
|
||||
WorkspacePackage? findPackageFor(String filePath) {
|
||||
var startFolder = provider.getFolder(filePath);
|
||||
for (var folder in startFolder.withAncestors) {
|
||||
if (folder.path.length < root.length) {
|
||||
// We've walked up outside of [root], so [path] is definitely not
|
||||
|
||||
@@ -268,17 +268,17 @@ class PackageBuildWorkspace extends Workspace implements PubWorkspace {
|
||||
}
|
||||
|
||||
@override
|
||||
PackageBuildWorkspacePackage? findPackageFor(String path) {
|
||||
PackageBuildWorkspacePackage? findPackageFor(String filePath) {
|
||||
var pathContext = provider.pathContext;
|
||||
|
||||
// Must be in this workspace.
|
||||
if (!pathContext.isWithin(root, path)) {
|
||||
if (!pathContext.isWithin(root, filePath)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// If generated, must be for this package.
|
||||
if (pathContext.isWithin(generatedRootPath, path)) {
|
||||
if (!pathContext.isWithin(generatedThisPath, path)) {
|
||||
if (pathContext.isWithin(generatedRootPath, filePath)) {
|
||||
if (!pathContext.isWithin(generatedThisPath, filePath)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,12 +41,12 @@ abstract class Workspace {
|
||||
SourceFactory createSourceFactory(
|
||||
DartSdk? sdk, SummaryDataStore? summaryData);
|
||||
|
||||
/// Find the [WorkspacePackage] where the library at [path] is defined.
|
||||
/// Find the [WorkspacePackage] where the library at [filePath] is defined.
|
||||
///
|
||||
/// Separate from [Packages] or [packageMap], this method is designed to find
|
||||
/// the package, by its root, in which a library at an arbitrary path is
|
||||
/// defined.
|
||||
WorkspacePackage? findPackageFor(String path);
|
||||
WorkspacePackage? findPackageFor(String filePath);
|
||||
}
|
||||
|
||||
/// Abstract superclass of classes that provide information about a package
|
||||
|
||||
Reference in New Issue
Block a user