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

Unified Diff: pkg/dev_compiler/lib/src/compiler/js_interop.dart

Issue 2940323003: fix super setters when super is not allowed (Closed)
Patch Set: Created 3 years, 6 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
Index: pkg/dev_compiler/lib/src/compiler/js_interop.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/js_interop.dart b/pkg/dev_compiler/lib/src/compiler/js_interop.dart
index 7e9fcc8f74c3bd3a9fa454c36d676fc9ecd4143c..03d64b54bd4aaec35e241cb37bde8165985545f8 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_interop.dart
@@ -74,8 +74,11 @@ bool isNativeAnnotation(DartObjectImpl value) =>
/// the SDK), or `null` if there's none. This is used to control the name
/// under which functions are compiled and exported.
String getJSExportName(Element e) {
+ var original = e;
+ if (original is PropertyAccessorElement) e = original.variable;
if (e.source.isInSystemLibrary) {
- return getAnnotationName(e, isJSExportNameAnnotation) ?? e.name;
+ var real = original.isSynthetic ? e : original;
+ return getAnnotationName(real, isJSExportNameAnnotation) ?? e.name;
}
return e.name;
}
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/code_generator.dart ('k') | tests/language_strong/super_from_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698