| Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| index aba2213c581e3c1b60005ae7c3cca65202e2c4c1..1e03d331dc3579f3748e1b682b2a371efab11199 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
|
| @@ -448,9 +448,14 @@ class ResolverTask extends CompilerTask {
|
| ResolverVisitor visitor = visitorFor(element);
|
| visitor.useElement(tree, element);
|
|
|
| - // TODO(johnniwinther): Avoid analyzing initializers if
|
| - // [Compiler.analyzeSignaturesOnly] is set.
|
| - initializerDo(tree, visitor.visit);
|
| + SendSet send = tree.asSendSet();
|
| + if (send != null) {
|
| + if (!compiler.analyzeSignaturesOnly) {
|
| + visitor.visit(send.arguments.head);
|
| + }
|
| + } else if (element.modifiers.isConst()) {
|
| + compiler.reportError(element, MessageKind.CONST_WITHOUT_INITIALIZER);
|
| + }
|
|
|
| if (Elements.isStaticOrTopLevelField(element)) {
|
| if (tree.asSendSet() != null) {
|
|
|