| Index: lib/compiler/implementation/elements/elements.dart
|
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
|
| index 1d951796313ebf2a8e5288d1ba8c9784d315d79c..c98ab47d9817488da00722f8f6932903eff37b52 100644
|
| --- a/lib/compiler/implementation/elements/elements.dart
|
| +++ b/lib/compiler/implementation/elements/elements.dart
|
| @@ -444,7 +444,16 @@ class VariableElement extends Element {
|
| ElementKind kind,
|
| Element enclosing,
|
| [Node node])
|
| - : super(name, kind, enclosing), cachedNode = node;
|
| + : super(name, kind, enclosing), cachedNode = node;
|
| +
|
| + VariableElement.from(SourceString name,
|
| + VariableElement other,
|
| + Element enclosing)
|
| + : this(name,
|
| + new VariableListElement.from(other.variables, enclosing),
|
| + other.kind,
|
| + enclosing,
|
| + other.cachedNode);
|
|
|
| Node parseNode(DiagnosticListener listener) {
|
| if (cachedNode !== null) return cachedNode;
|
| @@ -522,6 +531,24 @@ class VariableListElement extends Element {
|
| this.cachedNode = node,
|
| this.modifiers = node.modifiers;
|
|
|
| + factory VariableListElement.from(VariableListElement other,
|
| + Element enclosing) {
|
| + var variableList;
|
| + if (other is PartialFieldListElement) {
|
| + variableList = new PartialFieldListElement(other.beginToken,
|
| + other.endToken,
|
| + other.modifiers,
|
| + enclosing);
|
| + } else {
|
| + variableList = new VariableListElement(other.kind,
|
| + other.modifiers,
|
| + enclosing);
|
| + }
|
| + variableList.cachedNode = other.cachedNode;
|
| + variableList.type = other.type;
|
| + return variableList;
|
| + }
|
| +
|
| VariableDefinitions parseNode(DiagnosticListener listener) {
|
| return cachedNode;
|
| }
|
|
|