Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1361)

Unified Diff: dart/frog/leg/tree_validator.dart

Issue 9241016: Fix two crashes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update leg_only status Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/frog/leg/ssa/builder.dart ('k') | dart/frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/tree_validator.dart
diff --git a/dart/frog/leg/tree_validator.dart b/dart/frog/leg/tree_validator.dart
index fab055be705cb6645b2271f819529814b66c1e51..9683721a6b0cb464feef6ece6dfdfa7c717647dd 100644
--- a/dart/frog/leg/tree_validator.dart
+++ b/dart/frog/leg/tree_validator.dart
@@ -43,7 +43,11 @@ class ValidatorVisitor extends AbstractVisitor {
expect(node, selector is Identifier, 'selector is not assignable');
if (name === '++' || name === '--') {
expect(node, node.assignmentOperator is Operator);
- expect(node, node.arguments.isEmpty());
+ if (node.isIndex) {
+ expect(node.arguments.tail.head, node.arguments.tail.isEmpty());
+ } else {
+ expect(node.arguments.head, node.arguments.isEmpty());
+ }
} else {
expect(node, !node.arguments.isEmpty());
}
« no previous file with comments | « dart/frog/leg/ssa/builder.dart ('k') | dart/frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698