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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 2022213002: _visitTest should look through parentheses (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 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
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index dad88eb3fa58f5ca1436eebfa9f3c9fb0b12fff5..6077c26ec543a7704068904a85b2aa28062f9254 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -4390,6 +4390,9 @@ class CodeGenerator extends GeneralizingAstVisitor
if (node is PrefixExpression && node.operator.lexeme == '!') {
return finish(js.call('!#', _visitTest(node.operand)));
}
+ if (node is ParenthesizedExpression) {
+ return finish(_visitTest(node.expression));
+ }
if (node is BinaryExpression) {
JS.Expression shortCircuit(String code) {
return finish(js.call(code,
« no previous file with comments | « lib/runtime/dart_sdk.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698