Index: samples/ui_lib/util/CollectionUtils.dart |
diff --git a/samples/ui_lib/util/CollectionUtils.dart b/samples/ui_lib/util/CollectionUtils.dart |
index 4062212c3104da7086816eda23e8669c068e9cab..28ac980ca866f43496d6160aed561cacfb1a8a29 100644 |
--- a/samples/ui_lib/util/CollectionUtils.dart |
+++ b/samples/ui_lib/util/CollectionUtils.dart |
@@ -46,7 +46,7 @@ class CollectionUtils { |
static List map(Iterable source, var mapper) { |
// TODO(jmesserly): I was trying to set the capacity here, but instead it |
// seems to create a fixed list. Hence assigning by index below. |
- List result = new List(source is List ? source.dynamic.length : null); |
+ List result = new List(source is List ? (source as Dynamic).length : null); |
kasperl
2012/09/14 07:56:33
This also smells bad.
Lasse Reichstein Nielsen
2012/09/17 11:58:06
Much. And it's obvious what to do, so I'll make th
|
int i = 0; |
for (final item in source) { |
result[i++] = mapper(item); |