Skip to content

Commit bd75a0e

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Migrate src/dart/resolver/resolution_visitor.dart
Change-Id: I437832601417230a29a12f74ba705e784e3a5505 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415980 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
1 parent ba90daf commit bd75a0e

File tree

3 files changed

+99
-89
lines changed

3 files changed

+99
-89
lines changed

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6721,7 +6721,7 @@ class JoinPatternVariableElementImpl2 extends PatternVariableElementImpl2
67216721
result.add(variable);
67226722
if (variable is JoinPatternVariableElementImpl2) {
67236723
for (var variable in variable.variables2) {
6724-
append(variable as PatternVariableElementImpl2);
6724+
append(variable);
67256725
}
67266726
}
67276727
}
@@ -6734,7 +6734,7 @@ class JoinPatternVariableElementImpl2 extends PatternVariableElementImpl2
67346734
List<PatternVariableElementImpl> get variables => _wrappedElement.variables;
67356735

67366736
@override
6737-
List<PatternVariableElement2> get variables2 =>
6737+
List<PatternVariableElementImpl2> get variables2 =>
67386738
_wrappedElement.variables.map((fragment) => fragment.element).toList();
67396739

67406740
@override
@@ -7603,9 +7603,7 @@ class LocalFunctionElementImpl extends ExecutableElementImpl2
76037603
@override
76047604
final LocalFunctionFragmentImpl _wrappedElement;
76057605

7606-
LocalFunctionElementImpl(this._wrappedElement) {
7607-
_wrappedElement.element = this;
7608-
}
7606+
LocalFunctionElementImpl(this._wrappedElement);
76097607

76107608
@override
76117609
String? get documentationComment => _wrappedElement.documentationComment;
@@ -7681,7 +7679,7 @@ class LocalFunctionFragmentImpl extends FunctionElementImpl
76817679
implements LocalFunctionFragment {
76827680
/// The element corresponding to this fragment.
76837681
@override
7684-
late LocalFunctionElementImpl element;
7682+
late final LocalFunctionElementImpl element = LocalFunctionElementImpl(this);
76857683

76867684
@override
76877685
LocalFunctionFragmentImpl? previousFragment;

0 commit comments

Comments
 (0)