| Index: lib/compiler/implementation/dart_backend/placeholder_collector.dart
|
| diff --git a/lib/compiler/implementation/dart_backend/placeholder_collector.dart b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
|
| index dd2ae79cde0d6451c296142635d866ed7e3f9442..52322394425f3b619685f9beda0fcaab0852d93e 100644
|
| --- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart
|
| +++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart
|
| @@ -327,23 +327,13 @@ class PlaceholderCollector extends AbstractVisitor {
|
| visitTypeAnnotation(TypeAnnotation node) {
|
| // Poor man generic variables resolution.
|
| // TODO(antonm): get rid of it once resolver can deal with it.
|
| - if (isPlainTypeName(node)) {
|
| - NodeList typeParameters = null;
|
| - if (currentElement is TypedefElement) {
|
| - Typedef typedefNode = currentElement.parseNode(compiler);
|
| - typeParameters = typedefNode.typeParameters;
|
| - }
|
| - if (currentElement is ClassElement) {
|
| - ClassNode classNode = currentElement.parseNode(compiler);
|
| - typeParameters = classNode.typeParameters;
|
| - }
|
| - if (typeParameters !== null) {
|
| - SourceString name = node.typeName.asIdentifier().source;
|
| - for (TypeVariable parameter in typeParameters) {
|
| - if (parameter.name.source == name) {
|
| - // type annotation matches one of parameters, shouldn't be renamed.
|
| - return;
|
| - }
|
| + if (isPlainTypeName(node) && currentElement is TypeDeclarationElement) {
|
| + SourceString name = node.typeName.asIdentifier().source;
|
| + TypeDeclarationElement typeElement = currentElement;
|
| + for (TypeVariableType parameter in typeElement.typeVariables) {
|
| + if (parameter.name == name) {
|
| + // type annotation matches one of parameters, shouldn't be renamed.
|
| + return;
|
| }
|
| }
|
| }
|
|
|