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

Unified Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2619193003: Insert implicit downcasts in kernel strong mode. (Closed)
Patch Set: Merge Created 3 years, 11 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 | « pkg/kernel/lib/target/vm.dart ('k') | pkg/kernel/lib/transformations/insert_type_checks.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/text/ast_to_text.dart
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 01cdeb83055ff4555e0cdf9bd5272eaaf5ba680a..a0e722740c670be7aacd0a04f5999c75583fdc53 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -991,6 +991,12 @@ class Printer extends Visitor<Null> {
visitVariableGet(VariableGet node) {
writeVariableReference(node.variable);
+ if (node.promotedType != null) {
+ writeSymbol('{');
+ writeNode(node.promotedType);
+ writeSymbol('}');
+ state = WORD;
+ }
}
visitVariableSet(VariableSet node) {
@@ -1389,6 +1395,9 @@ class Printer extends Visitor<Null> {
}
visitFunctionType(FunctionType node) {
+ if (state == WORD) {
+ ensureSpace();
+ }
writeTypeParameterList(node.typeParameters);
writeSymbol('(');
var positional = node.positionalParameters;
« no previous file with comments | « pkg/kernel/lib/target/vm.dart ('k') | pkg/kernel/lib/transformations/insert_type_checks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698