Chromium Code Reviews| 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 dd9a07863ed5dbe60eedca5ca8e250c459e593af..e943268a7d4dc1a8e86dadcb049f79069376119c 100644 |
| --- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart |
| +++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart |
| @@ -451,17 +451,21 @@ class PlaceholderCollector extends AbstractVisitor { |
| } |
| } |
| // TODO(antonm): is there a better way to detect unresolved types? |
| - if (type.element !== compiler.types.dynamicType.element) { |
| - // Corner case: dart:core type with a prefix. |
| - // Most probably there are some additional problems with |
| - // coreLibPrefix.Dynamic and coreLibPrefix.topLevels. |
| - if (type.element.getLibrary() === coreLibrary && hasPrefix) { |
| - makeNullPlaceholder(node.typeName.receiver); |
| - } else { |
| + // Corner case: dart:core type with a prefix. |
| + // Most probably there are some additional problems with |
| + // coreLibPrefix.topLevels. |
| + Element typeElement = type.element; |
| + Element dynamicTypeElement = compiler.types.dynamicType.element; |
| + if (hasPrefix && |
| + (typeElement.getLibrary() === coreLibrary || |
|
Roman
2012/09/24 15:24:57
if continuation is usually indented by 4 spaces, o
Anton Muhin
2012/09/24 16:00:22
Done.
|
| + typeElement === dynamicTypeElement)) { |
| + makeNullPlaceholder(node.typeName.receiver); |
| + } else { |
| + if (typeElement !== dynamicTypeElement) { |
| makeTypePlaceholder(target, type); |
| + } else { |
| + if (!isDynamicType(node)) makeUnresolvedPlaceholder(target); |
| } |
| - } else { |
| - if (!isDynamicType(node)) makeUnresolvedPlaceholder(target); |
| } |
| } |
| node.visitChildren(this); |