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

Unified Diff: compiler/java/com/google/dart/compiler/type/Types.java

Issue 8948001: Updates dartc to recognize 'default' keyword on interface and updated factory method syntax (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Got rid of some problems. Created 9 years 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 d5c21807ed836e8c3dcf71999cfeb0652eb4cdcd..d882aee5c96147afe78158230544cb2ac78f60a0 100644
--- a/compiler/java/com/google/dart/compiler/type/Types.java
+++ b/compiler/java/com/google/dart/compiler/type/Types.java
@@ -10,7 +10,6 @@ import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartPropertyAccess;
import com.google.dart.compiler.ast.DartTypeNode;
import com.google.dart.compiler.resolver.ClassElement;
-import com.google.dart.compiler.resolver.ConstructorElement;
import com.google.dart.compiler.resolver.CoreTypeProvider;
import com.google.dart.compiler.resolver.Element;
import com.google.dart.compiler.resolver.FunctionAliasElement;
@@ -19,7 +18,6 @@ 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;
@@ -340,8 +338,8 @@ public class Types {
public static FunctionType makeFunctionType(ResolutionErrorListener listener,
ClassElement element,
- List<VariableElement> parameters, Type returnType,
- List<TypeVariable> typeVariables) {
+ List<VariableElement> parameters,
+ Type returnType) {
List<Type> parameterTypes = new ArrayList<Type>(parameters.size());
Map<String, Type> namedParameterTypes = null;
Type restParameter = null;
@@ -357,7 +355,7 @@ public class Types {
}
}
return FunctionTypeImplementation.of(element, parameterTypes, namedParameterTypes,
- restParameter, returnType, typeVariables);
+ restParameter, returnType);
}
public static Types getInstance(CoreTypeProvider typeProvider) {
@@ -417,17 +415,4 @@ public class Types {
DartTypeNode typeNode = constructorTypeNode(node);
return (InterfaceType) typeNode.getType();
}
-
- /**
- * Returns the list of type variables on the factory invoked by the given node.
- * This method never returns null.
- */
- public static List<TypeVariable> factoryTypeVariables(DartNewExpression node) {
- ConstructorElement factory = node.getSymbol();
- if (factory == null) {
- return Collections.emptyList();
- }
- FunctionType type = (FunctionType) factory.getType();
- return type.getTypeVariables();
- }
}

Powered by Google App Engine
This is Rietveld 408576698