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

Unified Diff: pkg/serialization/lib/src/serialization_rule.dart

Issue 11664006: Make Map.keys/values Iterables. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Add TODO that map.keys should return a Set. Created 7 years, 12 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/serialization/lib/src/serialization_rule.dart
diff --git a/pkg/serialization/lib/src/serialization_rule.dart b/pkg/serialization/lib/src/serialization_rule.dart
index 1f64cf07953a2715cdce208f290428528cd4358b..1a68075490d5bc81fc9db84ab10d2f5a4b1e1d4c 100644
--- a/pkg/serialization/lib/src/serialization_rule.dart
+++ b/pkg/serialization/lib/src/serialization_rule.dart
@@ -516,14 +516,14 @@ class _LazyMap implements Map {
int get length => _raw.length;
bool get isEmpty => _raw.isEmpty;
- List get keys => _raw.keys;
+ Iterable get keys => _raw.keys;
bool containsKey(x) => _raw.containsKey(x);
// These operations will work, but may be expensive, and are probably
// best avoided.
get _inflated => keysAndValues(_raw).map(_reader.inflateReference);
bool containsValue(x) => _inflated.containsValue(x);
- List get values => _inflated.values;
+ Iterable get values => _inflated.values;
void forEach(f) => _inflated.forEach(f);
// These operations are all invalid
« no previous file with comments | « pkg/serialization/lib/src/serialization_helpers.dart ('k') | pkg/serialization/test/serialization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698