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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2435163002: fix #27631, get/set methods no longer shadow index operator (Closed)
Patch Set: Created 4 years, 2 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/ddc_runtime/operations.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
index ba0dbc662b8cca7f558a38849e0b79aa130d8eeb..946507ca217b5c90b615dd971660901c0b6d3d60 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart
@@ -312,10 +312,10 @@ dsend(obj, method, @rest args) => _callMethod(obj, method, null, args, method);
dgsend(obj, typeArgs, method, @rest args) =>
_callMethod(obj, method, typeArgs, args, method);
-dindex(obj, index) => _callMethod(obj, 'get', null, JS('', '[#]', index), '[]');
+dindex(obj, index) => _callMethod(obj, '_get', null, JS('', '[#]', index), '[]');
dsetindex(obj, index, value) =>
- _callMethod(obj, 'set', null, JS('', '[#, #]', index, value), '[]=');
+ _callMethod(obj, '_set', null, JS('', '[#, #]', index, value), '[]=');
/// TODO(leafp): This duplicates code in types.dart.
/// I haven't found a way to factor it out that makes the
@@ -535,11 +535,11 @@ map(values, [K, V]) => JS(
for (let i = 0, end = $values.length - 1; i < end; i += 2) {
let key = $values[i];
let value = $values[i + 1];
- map.set(key, value);
+ map._set(key, value);
}
} else if (typeof $values === 'object') {
for (let key of $getOwnPropertyNames($values)) {
- map.set(key, $values[key]);
+ map._set(key, $values[key]);
}
}
return map;

Powered by Google App Engine
This is Rietveld 408576698