Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: samples/ui_lib/util/CollectionUtils.dart

Issue 10914286: Remove Object.dynamic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698