| 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..81a8740670d4a31a4f589e9276e5d3d2b4e2d746 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 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) {
|
|
|