Chromium Code Reviews| Index: compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
| diff --git a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
| index 122c74dea7ba53e6aea45edf743fbad9dbdf3e3b..2d2e11c9de1f780cc17e26478536fdbf3a265119 100644 |
| --- a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
| +++ b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
| @@ -23,8 +23,11 @@ import com.google.dart.compiler.ast.DartUnit; |
| import com.google.dart.compiler.ast.LibraryUnit; |
| import com.google.dart.compiler.ast.Modifiers; |
| import com.google.dart.compiler.common.SourceInfo; |
| +import com.google.dart.compiler.type.Type; |
| +import com.google.dart.compiler.type.TypeVariable; |
| import com.google.dart.compiler.type.Types; |
| +import java.util.Collections; |
| import java.util.List; |
| /** |
| @@ -151,8 +154,10 @@ public class TopLevelElementBuilder { |
| public Void visitClass(DartClass node) { |
| ClassElement element = Elements.classFromNode(node, library); |
| List<DartTypeParameter> parameterNodes = node.getTypeParameters(); |
| - element.setType(Types.interfaceType(element, |
| - Elements.makeTypeVariables(parameterNodes, element))); |
| + List<TypeVariable> typeVariables = Elements.makeTypeVariables(parameterNodes, element); |
| + element.setType(Types.interfaceType( |
| + element, |
| + Collections.<Type>unmodifiableList(typeVariables))); |
|
zundel
2012/01/23 16:18:21
Is the unmodifiable list just for safety or did yo
scheglov
2012/01/23 19:32:27
Basically this allows us to pass List<TypeVariable
|
| node.setSymbol(element); |
| return null; |
| } |