| Index: lib/compiler/implementation/resolver.dart
|
| diff --git a/lib/compiler/implementation/resolver.dart b/lib/compiler/implementation/resolver.dart
|
| index f9b52968b1ebb131e06e25b3d6c0650ef8b77312..0b4f69e05603052d1ff173e98d0f00506fac5328 100644
|
| --- a/lib/compiler/implementation/resolver.dart
|
| +++ b/lib/compiler/implementation/resolver.dart
|
| @@ -1547,19 +1547,6 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
|
| return null;
|
| }
|
|
|
| - TypeAnnotation getTypeAnnotationFromSend(Send send) {
|
| - if (send.selector.asTypeAnnotation() !== null) {
|
| - return send.selector;
|
| - } else if (send.selector.asSend() !== null) {
|
| - Send selector = send.selector;
|
| - if (selector.receiver.asTypeAnnotation() !== null) {
|
| - return selector.receiver;
|
| - }
|
| - } else {
|
| - compiler.internalError("malformed send in new expression");
|
| - }
|
| - }
|
| -
|
| /**
|
| * Try to resolve the constructor that is referred to by [node].
|
| * Note: this function may return an ErroneousFunctionElement instead of
|
| @@ -1571,7 +1558,7 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
|
| new ConstructorResolver(compiler, this, node.isConst());
|
| FunctionElement constructor = node.accept(visitor);
|
| // Try to resolve the type that the new-expression constructs.
|
| - TypeAnnotation annotation = getTypeAnnotationFromSend(node.send);
|
| + TypeAnnotation annotation = node.send.getTypeAnnotation();
|
| if (Element.isInvalid(constructor)) {
|
| // Resolve the type arguments. We cannot create a type and check the
|
| // number of type arguments for this annotation, because we do not know
|
|
|