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

Unified Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 1151163004: Implementation of null-aware operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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: pkg/compiler/lib/src/tree/unparser.dart
diff --git a/pkg/compiler/lib/src/tree/unparser.dart b/pkg/compiler/lib/src/tree/unparser.dart
index 5325f1377dff6fb58b8bffa528a3487fa034cdca..b0275d3abd724ffb0e95995740b22150645a0bca 100644
--- a/pkg/compiler/lib/src/tree/unparser.dart
+++ b/pkg/compiler/lib/src/tree/unparser.dart
@@ -426,7 +426,7 @@ class Unparser extends Indentation implements Visitor {
indentLess();
indentLess();
} else if (node.selector.asOperator() == null) {
- write('.');
+ write(node.isConditional ? '?.' : '.');
} else if (spacesNeeded) {
write(' ');
}

Powered by Google App Engine
This is Rietveld 408576698