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 89e204c072b5b16ef54f060f462f8b5749037b92..eb49f529771483ed3ab4a12ef6fb1983715c11a4 100644 |
--- a/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
+++ b/compiler/java/com/google/dart/compiler/resolver/TopLevelElementBuilder.java |
@@ -14,6 +14,7 @@ import com.google.dart.compiler.DartCompilerListener; |
import com.google.dart.compiler.ErrorCode; |
import com.google.dart.compiler.ast.ASTVisitor; |
import com.google.dart.compiler.ast.DartClass; |
+import com.google.dart.compiler.ast.DartClassTypeAlias; |
import com.google.dart.compiler.ast.DartField; |
import com.google.dart.compiler.ast.DartFieldDefinition; |
import com.google.dart.compiler.ast.DartFunctionTypeAlias; |
@@ -283,6 +284,19 @@ public class TopLevelElementBuilder { |
} |
@Override |
+ public Void visitClassTypeAlias(DartClassTypeAlias node) { |
+ ClassAliasElement element = Elements.classFromNode(node, library); |
+ List<DartTypeParameter> parameterNodes = node.getTypeParameters(); |
+ List<TypeVariable> typeVariables = Elements.makeTypeVariables(parameterNodes, element); |
+ element.setType(Types.interfaceType( |
+ element, |
+ Collections.<Type>unmodifiableList(typeVariables))); |
+ node.setElement(element); |
+ node.getName().setElement(element); |
+ return null; |
+ } |
+ |
+ @Override |
public Void visitFunctionTypeAlias(DartFunctionTypeAlias node) { |
FunctionAliasElement element = Elements.functionTypeAliasFromNode(node, library); |
List<DartTypeParameter> parameterNodes = node.getTypeParameters(); |