Chromium Code Reviews| Index: lib/compiler/implementation/lib/constant_map.dart |
| diff --git a/lib/compiler/implementation/lib/constant_map.dart b/lib/compiler/implementation/lib/constant_map.dart |
| index 14072133fff9975af94eb7e834659ae8682a9d17..4fe7e37a14f60929e53fc91d54419be551cd899c 100644 |
| --- a/lib/compiler/implementation/lib/constant_map.dart |
| +++ b/lib/compiler/implementation/lib/constant_map.dart |
| @@ -40,13 +40,13 @@ class ConstantMap<V> implements Map<String, V> { |
| String toString() => Maps.mapToString(this); |
| - _throwImmutable() { |
| - throw const IllegalAccessException(); |
| + _throwUnmodifiable() { |
| + throw new StateError("Cannot modify unmodifable Map"); |
|
floitsch
2012/10/23 12:50:32
unmodifiable
Lasse Reichstein Nielsen
2012/10/24 12:32:15
Done.
|
| } |
| - void operator []=(String key, V val) => _throwImmutable(); |
| - V putIfAbsent(String key, V ifAbsent()) => _throwImmutable(); |
| - V remove(String key) => _throwImmutable(); |
| - void clear() => _throwImmutable(); |
| + void operator []=(String key, V val) => _throwUnmodifiable(); |
| + V putIfAbsent(String key, V ifAbsent()) => _throwUnmodifiable(); |
| + V remove(String key) => _throwUnmodifiable(); |
| + void clear() => _throwUnmodifiable(); |
| } |
| // This class has no constructor. This is on purpose since the instantiation |