Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart |
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart |
index ef79b3684f65c40a311273fa5f7cdf4f96d1454c..ce58c459435ee80d60c3ac3612d8dce61750db8d 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart |
@@ -832,7 +832,7 @@ class CodeGenerator extends GeneralizingAstVisitor |
_emitClassTypeTests(classElem, className, body); |
_defineNamedConstructors(ctors, body, className, isCallableTransitive); |
- _emitVirtualFieldSymbols(className, body); |
+ _emitVirtualFieldSymbols(classElem, body); |
_emitClassSignature( |
methods, allFields, classElem, ctors, extensions, className, body); |
_defineExtensionMembers(extensions, className, body); |
@@ -1090,10 +1090,10 @@ class CodeGenerator extends GeneralizingAstVisitor |
} |
void _emitVirtualFieldSymbols( |
- JS.Expression className, List<JS.Statement> body) { |
+ ClassElement classElement, List<JS.Statement> body) { |
_classProperties.virtualFields.forEach((field, virtualField) { |
- body.add(js.statement('const # = Symbol(#.name + "." + #.toString());', |
- [virtualField, className, _declareMemberName(field.getter)])); |
+ body.add(js.statement('const # = Symbol(#);', |
+ [virtualField, js.string('${classElement.name}.${field.name}')])); |
}); |
} |