| Index: lib/compiler/implementation/resolver.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/resolver.dart (revision 8424)
|
| +++ lib/compiler/implementation/resolver.dart (working copy)
|
| @@ -1052,6 +1052,15 @@
|
| AbstractFieldElement field = target;
|
| target = field.getter;
|
| }
|
| + // TODO(ngeoffray): We should do the check in
|
| + // visitExpressionStatement instead.
|
| + if (target === compiler.assertMethod && !node.isCall) {
|
| + // We can only use assert by calling it.
|
| + if (!inInstanceContext) {
|
| + error(node, MessageKind.MISSING_ARGUMENTS_TO_ASSERT, [node]);
|
| + }
|
| + target = null;
|
| + }
|
| // TODO(ngeoffray): Warn if target is null and the send is
|
| // unqualified.
|
| useElement(node, target);
|
|
|