| Index: compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
|
| ===================================================================
|
| --- compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java (revision 11616)
|
| +++ compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java (working copy)
|
| @@ -7,9 +7,10 @@
|
| import com.google.common.collect.Lists;
|
| import com.google.dart.compiler.ast.DartClass;
|
| import com.google.dart.compiler.ast.DartDeclaration;
|
| +import com.google.dart.compiler.ast.DartIdentifier;
|
| import com.google.dart.compiler.ast.DartObsoleteMetadata;
|
| -import com.google.dart.compiler.ast.DartParameterizedTypeNode;
|
| import com.google.dart.compiler.ast.DartStringLiteral;
|
| +import com.google.dart.compiler.ast.DartTypeParameter;
|
| import com.google.dart.compiler.ast.Modifiers;
|
| import com.google.dart.compiler.common.SourceInfo;
|
| import com.google.dart.compiler.type.InterfaceType;
|
| @@ -65,7 +66,7 @@
|
| metadata = node.getObsoleteMetadata();
|
| modifiers = node.getModifiers();
|
| nameLocation = node.getName().getSourceInfo();
|
| - declarationNameWithTypeParameter = new DartParameterizedTypeNode(node.getName(), node.getTypeParameters()).toSource();
|
| + declarationNameWithTypeParameter = createDeclarationName(node.getName(), node.getTypeParameters());
|
| } else {
|
| isInterface = false;
|
| metadata = DartObsoleteMetadata.EMPTY;
|
| @@ -355,6 +356,24 @@
|
| return supertypes;
|
| }
|
|
|
| + private String createDeclarationName(
|
| + DartIdentifier name, List<DartTypeParameter> typeParameters) {
|
| + StringBuilder builder = new StringBuilder();
|
| + builder.append(name.toSource());
|
| + int count = typeParameters.size();
|
| + if (count > 0) {
|
| + builder.append("<");
|
| + for (int i = 0; i < count; i++) {
|
| + if (i > 0) {
|
| + builder.append(", ");
|
| + }
|
| + builder.append(typeParameters.get(i).toSource());
|
| + }
|
| + builder.append(">");
|
| + }
|
| + return builder.toString();
|
| + }
|
| +
|
| private void addInterfaceToSupertypes(Map<ClassElement, InterfaceType> interfaces,
|
| ArrayList<InterfaceType> supertypes,
|
| InterfaceType intf) {
|
|
|