Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java

Issue 9270016: Issue 932. Checks for various named arguments cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698