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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart

Issue 288343014: dart2dart: Test cases for better code coverage in dart_tree rewritings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
Index: sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
index 4d932214eb2e46c822221bff96818a3a3502c0f5..3a1c894340e7bf8afb50b2d78461fd5240ec25e3 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
@@ -1353,7 +1353,7 @@ class LogicalRewriter extends Visitor<Statement, Expression> {
putInBooleanContext(node.elseExpression));
}
// x ? false : y ==> !x && y (if y is known to be a boolean)
- if (isBooleanValued(node.elseExpression) && isTrue(node.thenExpression)) {
+ if (isBooleanValued(node.elseExpression) && isFalse(node.thenExpression)) {
return new LogicalOperator.and(
makeCondition(node.condition, false, liftNots: false),
putInBooleanContext(node.elseExpression));

Powered by Google App Engine
This is Rietveld 408576698