22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- import 'package:analyzer/dart/element/element.dart' ;
65import 'package:analyzer/dart/element/element2.dart' ;
76import 'package:analyzer/dart/element/scope.dart' ;
87// ignore: implementation_imports
98import 'package:analyzer/src/dart/ast/ast.dart' ;
109// ignore: implementation_imports
1110import 'package:analyzer/src/generated/resolver.dart' show ScopeResolverVisitor;
12- // ignore: implementation_imports
13- import 'package:analyzer/src/utilities/extensions/element.dart' ;
1411
1512LinterNameInScopeResolutionResult resolveNameInScope (
1613 String id,
@@ -26,9 +23,9 @@ LinterNameInScopeResolutionResult resolveNameInScope(
2623 }
2724
2825 if (scope != null ) {
29- var ScopeLookupResult (: setter , : getter ) = scope.lookup (id);
30- var requestedElement = shouldResolveSetter ? setter : getter ;
31- var differentElement = shouldResolveSetter ? getter : setter ;
26+ var ScopeLookupResult (: setter2 , : getter2 ) = scope.lookup (id);
27+ var requestedElement = shouldResolveSetter ? setter2 : getter2 ;
28+ var differentElement = shouldResolveSetter ? getter2 : setter2 ;
3229
3330 if (requestedElement != null ) {
3431 return LinterNameInScopeResolutionResult ._requestedName (requestedElement);
@@ -45,7 +42,7 @@ LinterNameInScopeResolutionResult resolveNameInScope(
4542/// The result of resolving of a basename `id` in a scope.
4643class LinterNameInScopeResolutionResult {
4744 /// The element with the requested basename, `null` is [isNone] .
48- final Element ? element;
45+ final Element2 ? element;
4946
5047 /// The state of the result.
5148 final _LinterNameInScopeResolutionResultState _state;
@@ -60,9 +57,6 @@ class LinterNameInScopeResolutionResult {
6057 const LinterNameInScopeResolutionResult ._requestedName (this .element)
6158 : _state = _LinterNameInScopeResolutionResultState .requestedName;
6259
63- /// The element with the requested basename, `null` is [isNone] .
64- Element2 ? get element2 => element.asElement2;
65-
6660 bool get isDifferentName =>
6761 _state == _LinterNameInScopeResolutionResultState .differentName;
6862
0 commit comments