Chromium Code Reviews| 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 2595674855ccde764ab95078df4959167a7e795f..cd68ae9a1e5c9f61fbba7654d5b353bca818bac4 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart |
| @@ -449,12 +449,16 @@ class ResolverTask extends CompilerTask { |
| visitor.useElement(tree, element); |
| SendSet send = tree.asSendSet(); |
| + Modifiers modifiers = element.modifiers; |
| if (send != null) { |
| // TODO(johnniwinther): Avoid analyzing initializers if |
| // [Compiler.analyzeSignaturesOnly] is set. |
| visitor.visit(send.arguments.head); |
| - } else if (element.modifiers.isConst()) { |
| + } else if (modifiers.isConst()) { |
| compiler.reportError(element, MessageKind.CONST_WITHOUT_INITIALIZER); |
| + } else if (modifiers.isStatic() && modifiers.isFinal()) { |
| + compiler.reportError(element, |
|
kasperl
2013/10/02 12:17:02
Shouldn't this be a warning?
|
| + MessageKind.STATIC_FINAL_WITHOUT_INITIALIZER); |
| } |
| if (Elements.isStaticOrTopLevelField(element)) { |