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

Unified Diff: compiler/java/com/google/dart/compiler/type/Types.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: Tweaks for comments, changes in tests. 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/type/Types.java
diff --git a/compiler/java/com/google/dart/compiler/type/Types.java b/compiler/java/com/google/dart/compiler/type/Types.java
index d882aee5c96147afe78158230544cb2ac78f60a0..54fc3a94076355983e67826fcb570726c824bd53 100644
--- a/compiler/java/com/google/dart/compiler/type/Types.java
+++ b/compiler/java/com/google/dart/compiler/type/Types.java
@@ -18,6 +18,7 @@ import com.google.dart.compiler.resolver.TypeVariableElement;
import com.google.dart.compiler.resolver.VariableElement;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -308,12 +309,12 @@ public class Types {
if (type.isRaw()) {
return supertype.asRawType();
}
- List<? extends Type> arguments = type.getArguments();
- List<? extends Type> parameters = type.getElement().getTypeParameters();
+ List<Type> arguments = type.getArguments();
+ List<Type> parameters = type.getElement().getTypeParameters();
return supertype.subst(arguments, parameters);
}
- static void printTypesOn(StringBuilder sb, List<? extends Type> types,
+ static void printTypesOn(StringBuilder sb, List<Type> types,
String start, String end) {
sb.append(start);
boolean first = true;
@@ -327,8 +328,8 @@ public class Types {
sb.append(end);
}
- public static List<Type> subst(List<? extends Type> types,
- List<? extends Type> arguments, List<? extends Type> parameters) {
+ public static List<Type> subst(List<Type> types,
+ List<Type> arguments, List<Type> parameters) {
ArrayList<Type> result = new ArrayList<Type>(types.size());
for (Type type : types) {
result.add(type.subst(arguments, parameters));
@@ -362,13 +363,14 @@ public class Types {
return new Types(typeProvider);
}
- public static InterfaceType interfaceType(ClassElement element, List<? extends Type> arguments) {
+ public static InterfaceType interfaceType(ClassElement element, List<Type> arguments) {
return new InterfaceTypeImplementation(element, arguments);
}
public static FunctionAliasType functionAliasType(FunctionAliasElement element,
- List<TypeVariable> typeVariables) {
- return new FunctionAliasTypeImplementation(element, typeVariables);
+ List<TypeVariable> typeVariables) {
+ return new FunctionAliasTypeImplementation(element,
+ Collections.<Type>unmodifiableList(typeVariables));
}
public static TypeVariable typeVariable(TypeVariableElement element) {

Powered by Google App Engine
This is Rietveld 408576698