Index: lib/src/compiler/code_generator.dart |
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart |
index 78636a1fee364daef6630174b4d6576d594ba010..2c19b39ef6f2c7ac0a9af6e10978145d953ec503 100644 |
--- a/lib/src/compiler/code_generator.dart |
+++ b/lib/src/compiler/code_generator.dart |
@@ -3430,11 +3430,11 @@ class CodeGenerator extends GeneralizingAstVisitor |
@override |
visitSymbolLiteral(SymbolLiteral node) { |
- JS.New emitSymbol() { |
+ JS.Expression emitSymbol() { |
// TODO(vsm): When we canonicalize, we need to treat private symbols |
// correctly. |
var name = js.string(node.components.join('.'), "'"); |
- return new JS.New(_emitTypeName(types.symbolType), [name]); |
vsm
2016/04/22 18:23:49
Note: we need #.new to invoke the factory construc
Jennifer Messerly
2016/04/25 16:31:08
Nice. I wonder if instead of hard coding we should
|
+ return js.call('#.new(#)', [_emitTypeName(types.symbolType), name]); |
} |
return _emitConst(emitSymbol); |
} |