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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart

Issue 2623053004: Fix noSuchMethod handling of methods that are also extension methods. Fix noSuchMethod handling of … (Closed)
Patch Set: Created 3 years, 11 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/tool/input_sdk/private/js_mirrors.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
index 856009661428ad901676bb45967c5ab67bbcd2e4..e1280198b95d8ce750bf569f9611d8624d94ae9f 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_mirrors.dart
@@ -85,7 +85,24 @@ dynamic _getMember(Symbol symbol) {
if (privateSymbol != null) {
return privateSymbol;
}
- return getName(symbol);
+ var name = getName(symbol);
+ // TODO(jacobr): this code is duplicated in code_generator.dart
+ switch (name) {
+ case '[]':
+ name = '_get';
+ break;
+ case '[]=':
+ name = '_set';
+ break;
+ case 'unary-':
+ name = '_negate';
+ break;
+ case 'constructor':
+ case 'prototype':
+ name = '_$name';
+ break;
+ }
+ return name;
Jacob 2017/01/11 03:10:39 Even without the code_generator.dart change, this
}
String _getNameForESSymbol(member) {

Powered by Google App Engine
This is Rietveld 408576698