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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java

Issue 8993011: Don't allow elements of a DartBinaryExpression to be null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java b/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
index 592ca63d0515031b4033666e57ecd619a513ac87..96d1c0d45a5f99e71c978ca72d613f0384f14535 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
@@ -22,8 +22,8 @@ public class DartBinaryExpression extends DartExpression implements ElementRefer
assert op.isBinaryOperator() : op;
this.op = op;
- this.arg1 = becomeParentOf(arg1);
- this.arg2 = becomeParentOf(arg2);
+ this.arg1 = becomeParentOf(arg1 != null ? arg1 : new DartSyntheticErrorExpression());
mmendez 2011/12/19 20:01:37 Nit: should you be passing the token string to the
codefu 2011/12/19 23:24:18 There is no tokenString in this case as the argume
+ this.arg2 = becomeParentOf(arg2 != null ? arg2 : new DartSyntheticErrorExpression());
}
public DartExpression getArg1() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698