Index: pkg/analyzer/lib/src/dart/ast/ast.dart |
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart |
index a8d19170a933428f4fad6ad297e2364e80c580fe..4555a80031ad9492e24e7f8f56849580f5821fd3 100644 |
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart |
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart |
@@ -7600,8 +7600,7 @@ class NodeListImpl<E extends AstNode> extends Object |
/** |
* The node that is the parent of each of the elements in the list. |
*/ |
- @override |
- AstNodeImpl owner; |
+ AstNodeImpl _owner; |
/** |
* The elements contained in the list. |
@@ -7613,7 +7612,7 @@ class NodeListImpl<E extends AstNode> extends Object |
* are added to the list will have their parent set to the given [owner]. The |
* list will initially be populated with the given [elements]. |
*/ |
- NodeListImpl(this.owner, [List<E> elements]) { |
+ NodeListImpl(this._owner, [List<E> elements]) { |
addAll(elements); |
} |
@@ -7642,6 +7641,14 @@ class NodeListImpl<E extends AstNode> extends Object |
throw new UnsupportedError("Cannot resize NodeList."); |
} |
+ @override |
+ AstNode get owner => _owner; |
+ |
+ @override |
+ void set owner(AstNode value) { |
+ _owner = value as AstNodeImpl; |
+ } |
+ |
E operator [](int index) { |
if (index < 0 || index >= _elements.length) { |
throw new RangeError("Index: $index, Size: ${_elements.length}"); |
@@ -7653,7 +7660,7 @@ class NodeListImpl<E extends AstNode> extends Object |
if (index < 0 || index >= _elements.length) { |
throw new RangeError("Index: $index, Size: ${_elements.length}"); |
} |
- owner._becomeParentOf(node); |
+ _owner._becomeParentOf(node); |
_elements[index] = node; |
} |
@@ -7675,7 +7682,7 @@ class NodeListImpl<E extends AstNode> extends Object |
if (nodes != null && !nodes.isEmpty) { |
_elements.addAll(nodes); |
for (E node in nodes) { |
- owner._becomeParentOf(node); |
+ _owner._becomeParentOf(node); |
} |
return true; |
} |
@@ -7693,7 +7700,7 @@ class NodeListImpl<E extends AstNode> extends Object |
if (index < 0 || index > length) { |
throw new RangeError("Index: $index, Size: ${_elements.length}"); |
} |
- owner._becomeParentOf(node); |
+ _owner._becomeParentOf(node); |
if (length == 0) { |
_elements.add(node); |
} else { |