Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/lib/constant_map.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart b/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart |
| index fabebbd9409216987699335fed2fef99fe1d1517..625e0ed7cf8e3e744387518d9195d406952954d8 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart |
| @@ -35,7 +35,8 @@ class ConstantMap<V> implements Map<String, V> { |
| } |
| Iterable<V> get values { |
| - return new MappedIterable<String, V>(_keys, (String key) => this[key]); |
| + // TODO(floitsch): don't wrap the map twice. |
| + return keys.mappedBy((String key) => this[key]); |
|
Lasse Reichstein Nielsen
2013/01/21 09:02:03
Just do:
return _keys.mappedBy((String key) => t
floitsch
2013/01/21 14:16:10
No. The return type of 'values' should be an Itera
|
| } |
| bool get isEmpty => length == 0; |