| Index: pkg/compiler/lib/src/resolution/members.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
|
| index e47a5c4eb5652def078b44630b7c474b7d41dd2a..16aa1a2f704e39a5db01677e6b8aa288577b951f 100644
|
| --- a/pkg/compiler/lib/src/resolution/members.dart
|
| +++ b/pkg/compiler/lib/src/resolution/members.dart
|
| @@ -49,8 +49,7 @@ import 'operators.dart';
|
| import 'send_structure.dart';
|
|
|
| import 'constructors.dart' show
|
| - ConstructorResolver,
|
| - ConstructorResult;
|
| + ConstructorResolver;
|
| import 'label_scope.dart' show
|
| StatementScope;
|
| import 'registry.dart' show
|
| @@ -3637,7 +3636,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| bool isConstConstructor = constructor.isConst;
|
| bool isValidAsConstant = isConstConstructor;
|
| ConstructorElement redirectionTarget = resolveRedirectingFactory(
|
| - node, inConstContext: isConstConstructor).element;
|
| + node, inConstContext: isConstConstructor);
|
| constructor.immediateRedirectionTarget = redirectionTarget;
|
|
|
| Node constructorReference = node.constructorReference;
|
| @@ -3815,7 +3814,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
|
|
| ResolutionResult visitNewExpression(NewExpression node) {
|
| bool isValidAsConstant = true;
|
| - ConstructorElement constructor = resolveConstructor(node).element;
|
| + FunctionElement constructor = resolveConstructor(node);
|
| final bool isSymbolConstructor = constructor == compiler.symbolConstructor;
|
| final bool isMirrorsUsedConstant =
|
| node.isConst && (constructor == compiler.mirrorsUsedConstructor);
|
| @@ -3857,6 +3856,8 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| // factory constructors.
|
| registry.registerInstantiatedType(type);
|
| if (constructor.isGenerativeConstructor && cls.isAbstract) {
|
| + warning(node, MessageKind.ABSTRACT_CLASS_INSTANTIATION);
|
| + registry.registerAbstractClassInstantiation();
|
| isValidAsConstant = false;
|
| }
|
|
|
| @@ -3992,15 +3993,14 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
|
| * Note: this function may return an ErroneousFunctionElement instead of
|
| * [:null:], if there is no corresponding constructor, class or library.
|
| */
|
| - ConstructorResult resolveConstructor(NewExpression node) {
|
| - return node.accept(new ConstructorResolver(
|
| - compiler, this, inConstContext: node.isConst));
|
| + ConstructorElement resolveConstructor(NewExpression node) {
|
| + return node.accept(new ConstructorResolver(compiler, this));
|
| }
|
|
|
| - ConstructorResult resolveRedirectingFactory(RedirectingFactoryBody node,
|
| + ConstructorElement resolveRedirectingFactory(RedirectingFactoryBody node,
|
| {bool inConstContext: false}) {
|
| - return node.accept(new ConstructorResolver(
|
| - compiler, this, inConstContext: inConstContext));
|
| + return node.accept(new ConstructorResolver(compiler, this,
|
| + inConstContext: inConstContext));
|
| }
|
|
|
| DartType resolveTypeAnnotation(TypeAnnotation node,
|
|
|