| Index: sdk/lib/collection/maps.dart
|
| diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
|
| index 7945e7ea643411074c5e65769a5870c0733913c7..06dde937cf4a362483200ce9d54904f9738de074 100644
|
| --- a/sdk/lib/collection/maps.dart
|
| +++ b/sdk/lib/collection/maps.dart
|
| @@ -208,8 +208,21 @@ class MapView<K, V> implements Map<K, V> {
|
| * the constructor, except for operations that modify the map.
|
| * Modifying operations throw instead.
|
| */
|
| -class UnmodifiableMapView<K, V> =
|
| - MapView<K, V> with _UnmodifiableMapMixin<K, V>;
|
| +class UnmodifiableMapView<K, V> extends MapView<K, V>
|
| + with _UnmodifiableMapMixin<K, V> {
|
| + UnmodifiableMapView(Map<K, V> map) : super(map);
|
| +
|
| + /**
|
| + * Returns a view of [source] that's guaranteed to be unmodifiable.
|
| + *
|
| + * If [source] already extends [UnmodifiableMapBase] or [UnmodifiableMapView],
|
| + * it is returned without re-wrapping it.
|
| + */
|
| + static Map ensure(Map source) =>
|
| + source is _UnmodifiableMapMixin
|
| + ? source
|
| + : new UnmodifiableMapView(source);
|
| +}
|
|
|
| /**
|
| * Helper class which implements complex [Map] operations
|
|
|