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

Unified Diff: lib/compiler/implementation/tree/unparser.dart

Issue 11148014: Land 'Fix a crash related to obsolete factory syntax.'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « lib/compiler/implementation/scanner/listener.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/tree/unparser.dart
diff --git a/lib/compiler/implementation/tree/unparser.dart b/lib/compiler/implementation/tree/unparser.dart
index 8eda6371f0e8af805c210d71917a21d30d29440d..a99854a42edaf8852d3c77674c8510e1b7aa1214 100644
--- a/lib/compiler/implementation/tree/unparser.dart
+++ b/lib/compiler/implementation/tree/unparser.dart
@@ -270,7 +270,8 @@ class Unparser implements Visitor {
if (!node.isPrefix && !node.isIndex) visit(node.selector);
if (spacesNeeded) sb.add(' ');
// Also add a space for sequences like x + +1 and y - -y.
- if (opString === '-' || opString === '+') {
+ // TODO(ahe): remove case for '+' when we drop the support for it.
+ if (node.argumentsNode != null && (opString === '-' || opString === '+')) {
Token beginToken = node.argumentsNode.getBeginToken();
if (beginToken !== null && beginToken.stringValue === opString) {
sb.add(' ');
« no previous file with comments | « lib/compiler/implementation/scanner/listener.dart ('k') | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698