Index: sdk/lib/core/map.dart |
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart |
index 8b27b3e07bc4a95a9567f0aee70be0cec6e73258..de3807f766be81f55171b59bca3291ad29167fb8 100644 |
--- a/sdk/lib/core/map.dart |
+++ b/sdk/lib/core/map.dart |
@@ -47,6 +47,9 @@ abstract class Map<K, V> { |
* If [key] is not associated to a value, calls [ifAbsent] and |
* updates the map by mapping [key] to the value returned by |
* [ifAbsent]. Returns the value in the map. |
+ * |
+ * It is an error to add or remove keys from map during the call to |
+ * [ifAbsent]. |
*/ |
V putIfAbsent(K key, V ifAbsent()); |
@@ -65,6 +68,8 @@ abstract class Map<K, V> { |
/** |
* Applies [f] to each {key, value} pair of the map. |
+ * |
+ * It is an error to add or remove keys from the map during iteration. |
*/ |
void forEach(void f(K key, V value)); |