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

Unified Diff: pkg/compiler/lib/src/helpers/debug_collection.dart

Issue 2624743002: Use generic methods in DebugIterable (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/helpers/debug_collection.dart
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index b20bf0c649b8dce79f0ff2e7f7a2b24cac594216..2e053594182535a0c2b30fee02957e145b0d5e04 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart
@@ -71,11 +71,11 @@ class DebugIterable<E> implements Iterable<E> {
Iterator<E> get iterator => iterable.iterator;
- Iterable map(f(E element)) => iterable.map(f);
+ Iterable<T> map<T>( T f(E element)) => iterable.map(f);
Siggi Cherem (dart-lang) 2017/01/11 22:42:11 nit: dartfmt
Johnni Winther 2017/01/12 11:10:03 Done.
Iterable<E> where(bool test(E element)) => iterable.where(test);
- Iterable expand(Iterable f(E element)) => iterable.expand(f);
+ Iterable<T> expand<T>(Iterable<T> f(E element)) => iterable.expand(f);
bool contains(Object element) => iterable.contains(element);
@@ -83,8 +83,7 @@ class DebugIterable<E> implements Iterable<E> {
E reduce(E combine(E value, E element)) => iterable.reduce(combine);
- dynamic fold(
- var initialValue, dynamic combine(var previousValue, E element)) {
+ T fold<T>(T initialValue, T combine(T previousValue, E element)) {
return iterable.fold(initialValue, combine);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698