Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/ast/DartTypeNode.java |
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartTypeNode.java b/compiler/java/com/google/dart/compiler/ast/DartTypeNode.java |
| index b6ccbd330b6cc834b656ea8998f86de423fef718..b181e6a8dee99a3617877519af212be845979300 100644 |
| --- a/compiler/java/com/google/dart/compiler/ast/DartTypeNode.java |
| +++ b/compiler/java/com/google/dart/compiler/ast/DartTypeNode.java |
| @@ -4,9 +4,9 @@ |
| package com.google.dart.compiler.ast; |
| +import com.google.common.collect.ImmutableList; |
| import com.google.dart.compiler.type.Type; |
| -import java.util.ArrayList; |
| import java.util.List; |
| /** |
| @@ -15,16 +15,16 @@ import java.util.List; |
| public class DartTypeNode extends DartNode { |
| private DartNode identifier; |
| - private List<DartTypeNode> typeArguments = new ArrayList<DartTypeNode>(); |
| + private NodeList<DartTypeNode> typeArguments = NodeList.create(this); |
| private Type type; |
| public DartTypeNode(DartNode identifier) { |
| - this(identifier, new ArrayList<DartTypeNode>()); |
| + this(identifier, ImmutableList.<DartTypeNode>of()); |
|
Brian Wilkerson
2012/03/06 16:39:45
Given that NodeList.addAll handles an argument val
scheglov
2012/03/06 17:11:46
Done.
Thank you for catching this.
|
| } |
| public DartTypeNode(DartNode identifier, List<DartTypeNode> typeArguments) { |
| this.identifier = becomeParentOf(identifier); |
| - this.typeArguments = becomeParentOf(typeArguments); |
| + this.typeArguments.addAll(typeArguments); |
| } |
| public DartNode getIdentifier() { |
| @@ -48,7 +48,7 @@ public class DartTypeNode extends DartNode { |
| @Override |
| public void visitChildren(ASTVisitor<?> visitor) { |
| identifier.accept(visitor); |
| - visitor.visit(typeArguments); |
| + typeArguments.accept(visitor); |
| } |
| @Override |