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

Unified Diff: sdk/lib/_collection_dev/iterable.dart

Issue 18749002: Use typedefs in lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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: sdk/lib/_collection_dev/iterable.dart
diff --git a/sdk/lib/_collection_dev/iterable.dart b/sdk/lib/_collection_dev/iterable.dart
index 6e1e5ecb7c1b79be349de5fd215359d8294a6b0e..c069fe8d6a7db8e65fd7488490e952b14398e161 100644
--- a/sdk/lib/_collection_dev/iterable.dart
+++ b/sdk/lib/_collection_dev/iterable.dart
@@ -323,9 +323,7 @@ typedef T _Transformation<S, T>(S value);
class MappedIterable<S, T> extends IterableBase<T> {
final Iterable<S> _iterable;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _Transformation<S, T> */ _f;
+ final _Transformation<S, T> _f;
MappedIterable(this._iterable, T this._f(S element));
@@ -345,9 +343,7 @@ class MappedIterable<S, T> extends IterableBase<T> {
class MappedIterator<S, T> extends Iterator<T> {
T _current;
final Iterator<S> _iterator;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _Transformation<S, T> */ _f;
+ final _Transformation<S, T> _f;
MappedIterator(this._iterator, T this._f(S element));
@@ -366,9 +362,7 @@ class MappedIterator<S, T> extends Iterator<T> {
/** Specialized alternative to [MappedIterable] for mapped [List]s. */
class MappedListIterable<S, T> extends ListIterable<T> {
final Iterable<S> _source;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _Transformation<S, T> */ _f;
+ final _Transformation<S, T> _f;
MappedListIterable(this._source, T this._f(S value));
@@ -381,9 +375,7 @@ typedef bool _ElementPredicate<E>(E element);
class WhereIterable<E> extends IterableBase<E> {
final Iterable<E> _iterable;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
WhereIterable(this._iterable, bool this._f(E element));
@@ -392,9 +384,7 @@ class WhereIterable<E> extends IterableBase<E> {
class WhereIterator<E> extends Iterator<E> {
final Iterator<E> _iterator;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
WhereIterator(this._iterator, bool this._f(E element));
@@ -414,9 +404,7 @@ typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement);
class ExpandIterable<S, T> extends IterableBase<T> {
final Iterable<S> _iterable;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ExpandFunction */ _f;
+ final _ExpandFunction _f;
ExpandIterable(this._iterable, Iterable<T> this._f(S element));
@@ -425,9 +413,7 @@ class ExpandIterable<S, T> extends IterableBase<T> {
class ExpandIterator<S, T> implements Iterator<T> {
final Iterator<S> _iterator;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ExpandFunction */ _f;
+ final _ExpandFunction _f;
// Initialize _currentExpansion to an empty iterable. A null value
// marks the end of iteration, and we don't want to call _f before
// the first moveNext call.
@@ -499,9 +485,7 @@ class TakeIterator<E> extends Iterator<E> {
class TakeWhileIterable<E> extends IterableBase<E> {
final Iterable<E> _iterable;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
TakeWhileIterable(this._iterable, bool this._f(E element));
@@ -512,9 +496,7 @@ class TakeWhileIterable<E> extends IterableBase<E> {
class TakeWhileIterator<E> extends Iterator<E> {
final Iterator<E> _iterator;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
bool _isFinished = false;
TakeWhileIterator(this._iterator, bool this._f(E element));
@@ -575,9 +557,7 @@ class SkipIterator<E> extends Iterator<E> {
class SkipWhileIterable<E> extends IterableBase<E> {
final Iterable<E> _iterable;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
SkipWhileIterable(this._iterable, bool this._f(E element));
@@ -588,9 +568,7 @@ class SkipWhileIterable<E> extends IterableBase<E> {
class SkipWhileIterator<E> extends Iterator<E> {
final Iterator<E> _iterator;
- // TODO(ahe): Restore type when feature is implemented in dart2js
- // checked mode. http://dartbug.com/7733
- final /* _ElementPredicate */ _f;
+ final _ElementPredicate _f;
bool _hasSkipped = false;
SkipWhileIterator(this._iterator, bool this._f(E element));

Powered by Google App Engine
This is Rietveld 408576698