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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 1949253002: fix #549 export of properties (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | test/codegen/language/export_order_helper1.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index 898c6b57be226f3406c2815c4d858c587801ca44..255f15931c429f5c653b581e0435d18102ae04d9 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -416,7 +416,12 @@ class CodeGenerator extends GeneralizingAstVisitor
// Don't allow redefining names from this library.
if (currentNames.containsKey(export.name)) continue;
- _loader.emitDeclaration(export);
+ if (export.isSynthetic && export is PropertyInducingElement) {
+ _loader.emitDeclaration(export.getter);
+ _loader.emitDeclaration(export.setter);
+ } else {
+ _loader.emitDeclaration(export);
+ }
if (export is ClassElement && export.typeParameters.isNotEmpty) {
// Export the generic name as well.
// TODO(jmesserly): revisit generic classes
« no previous file with comments | « no previous file | test/codegen/language/export_order_helper1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698