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 03d64b54bd4aaec35e241cb37bde8165985545f8..0883e414a2d10446eb16cea2369c2ee2f9590193 100644 |
--- a/pkg/dev_compiler/lib/src/compiler/js_interop.dart |
+++ b/pkg/dev_compiler/lib/src/compiler/js_interop.dart |
@@ -74,11 +74,8 @@ 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) { |
- var real = original.isSynthetic ? e : original; |
- return getAnnotationName(real, isJSExportNameAnnotation) ?? e.name; |
- } |
- return e.name; |
+ if (!e.source.isInSystemLibrary) return null; |
+ |
+ e = e is PropertyAccessorElement && e.isSynthetic ? e.variable : e; |
+ return getAnnotationName(e, isJSExportNameAnnotation); |
} |