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 18d0b3963f8c344516f09962384608812021099f..5fd336874bdd8ea4b70fe9999b79af10441e4074 100644 |
| --- a/lib/compiler/implementation/dart_backend/placeholder_collector.dart |
| +++ b/lib/compiler/implementation/dart_backend/placeholder_collector.dart |
| @@ -434,9 +434,9 @@ class PlaceholderCollector extends Visitor { |
| } |
| // We call [resolveReturnType] to allow having 'void'. |
| final type = compiler.resolveReturnType(currentElement, node); |
| + bool hasPrefix = false; |
| if (type is InterfaceType || type is TypedefType) { |
| Node target = node.typeName; |
| - bool hasPrefix = false; |
| if (node.typeName is Send) { |
| final send = node.typeName.asSend(); |
| Identifier receiver = send.receiver; |
| @@ -473,7 +473,16 @@ class PlaceholderCollector extends Visitor { |
| } |
| } |
| } |
| - node.visitChildren(this); |
| + // Trying to differentiate new A.foo() and lib.A cases. In the latter case |
| + // we don't want to go deeper into typeName. |
| + if (hasPrefix) { |
| + // Visit only type arguments, otherwise in case of lib.Class type annotation |
|
Anton Muhin
2012/10/04 12:26:47
nit: long line
Roman
2012/10/04 12:40:48
Done.
|
| + // typeName is Send and we go to visitGetterSend, as a result "Class" is |
| + // added to member placeholders. |
| + visit(node.typeArguments); |
| + } else { |
| + node.visitChildren(this); |
| + } |
| } |
| visitVariableDefinitions(VariableDefinitions node) { |