Index: runtime/lib/array_patch.dart |
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart |
index 37c697c9d3ddd0524c7cf9a69f602e1de6e0323b..109938bf9d2070ce26c6688a610ce310c8c88365 100644 |
--- a/runtime/lib/array_patch.dart |
+++ b/runtime/lib/array_patch.dart |
@@ -48,6 +48,11 @@ patch class List<E> { |
return makeListFixedLength(list); |
} |
+ /* patch */ factory List.unmodifiable(Iterable elements) { |
+ List result = new List<E>.from(elements, growable: false); |
+ return makeFixedListUnmodifiable(result); |
+ } |
+ |
// Factory constructing a mutable List from a parser generated List literal. |
// [elements] contains elements that are already type checked. |
factory List._fromLiteral(List elements) { |