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

Unified Diff: sdk/lib/_internal/compiler/implementation/tree/nodes.dart

Issue 683803003: Support for loops in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 2 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 | « sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder_visitor.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/tree/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
index 505d2835c645d091d73ba8760fb34b487fc28345..5bb147e3b8d9ecf4beea419b4cc7539be7637bce 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
@@ -667,8 +667,10 @@ class For extends Loop {
For asFor() => this;
Expression get condition {
- if (conditionStatement is ExpressionStatement) {
- return conditionStatement.asExpressionStatement().expression;
+ ExpressionStatement expressionStatement =
+ conditionStatement.asExpressionStatement();
+ if (expressionStatement != null) {
+ return expressionStatement.expression;
} else {
return null;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder_visitor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698