Skip to content

Commit 280fd4c

Browse files
pqCommit Queue
authored andcommitted
[element model] migrate test_types_in_equals
Bug: https://github.com/dart-lang/linter/issues/5099 Change-Id: I454fac69834b9616387520166f36780ee39e3bc9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389421 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent e8ff9ef commit 280fd4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/linter/lib/src/rules/test_types_in_equals.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class _Visitor extends SimpleAstVisitor<void> {
4141
}
4242

4343
var parameters = declaration?.parameters;
44-
var parameterName = parameters?.parameterElements.first?.name;
44+
var parameterName = parameters?.parameterFragments.first?.name;
4545
if (expression.name == parameterName) {
4646
var typeName = _getTypeName(declaration!);
4747
rule.reportLint(node, arguments: [typeName]);
@@ -68,5 +68,5 @@ class _Visitor extends SimpleAstVisitor<void> {
6868
declaration != null &&
6969
declaration.isOperator &&
7070
declaration.name.lexeme == '==' &&
71-
declaration.parameters?.parameterElements.length == 1;
71+
declaration.parameters?.parameterFragments.length == 1;
7272
}

0 commit comments

Comments
 (0)