Index: lib/src/js_ast/type_printer.dart |
diff --git a/lib/src/js_ast/type_printer.dart b/lib/src/js_ast/type_printer.dart |
index 5f47711e294adab525c5cd6d5abc9f6d252bf135..db720bafc215c655d3df0a623c22818e3d3d6abe 100644 |
--- a/lib/src/js_ast/type_printer.dart |
+++ b/lib/src/js_ast/type_printer.dart |
@@ -148,14 +148,14 @@ class ClosureTypePrinter extends _TypePrinterBase implements NodeVisitor { |
@override |
visitAccess(PropertyAccess node) { |
var selector = node.selector; |
- assert(selector is LiteralString); |
- if (selector is! LiteralString) { |
+ if (selector is LiteralString) { |
+ visit(node.receiver); |
+ out("."); |
+ out(selector.valueWithoutQuotes); |
+ } else { |
+ assert(false); |
out("?"); |
- return; |
} |
- visit(node.receiver); |
- out("."); |
- out(selector.valueWithoutQuotes); |
} |
@override toString() => _buffer.toString(); |