mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:57:58 +00:00
Add stubs for new Dart 2.0 Iterable methods to Link.
See https://github.com/dart-lang/sdk/issues/31664 for more detail on the core library changes. Bug: Change-Id: Id67b60b12a1a47f121ca40f7ee146516a4ac51ee Reviewed-on: https://dart-review.googlesource.com/29940 Reviewed-by: Kevin Millikin <kmillikin@google.com> Reviewed-by: Peter von der Ahé <ahe@google.com> Commit-Queue: Leaf Petersen <leafp@google.com>
This commit is contained in:
parent
55d13097e0
commit
36057d82fa
|
@ -127,6 +127,7 @@ class Link<T> implements Iterable<T> {
|
|||
// Unsupported Iterable<T> methods.
|
||||
//
|
||||
bool any(bool f(T e)) => _unsupported('any');
|
||||
Iterable<T> cast<T>() => _unsupported('cast');
|
||||
T elementAt(int i) => _unsupported('elementAt');
|
||||
Iterable<K> expand<K>(Iterable<K> f(T e)) => _unsupported('expand');
|
||||
T firstWhere(bool f(T e), {T orElse()}) => _unsupported('firstWhere');
|
||||
|
@ -134,15 +135,18 @@ class Link<T> implements Iterable<T> {
|
|||
return _unsupported('fold');
|
||||
}
|
||||
|
||||
Iterable<T> followedBy(Iterable<T> other) => _unsupported('followedBy');
|
||||
T get last => _unsupported('get:last');
|
||||
T lastWhere(bool f(T e), {T orElse()}) => _unsupported('lastWhere');
|
||||
String join([separator = '']) => _unsupported('join');
|
||||
T reduce(T combine(T a, T b)) => _unsupported('reduce');
|
||||
T singleWhere(bool f(T e)) => _unsupported('singleWhere');
|
||||
Iterable<T> retype<T>() => _unsupported('retype');
|
||||
T singleWhere(bool f(T e), {T orElse()}) => _unsupported('singleWhere');
|
||||
Iterable<T> skipWhile(bool f(T e)) => _unsupported('skipWhile');
|
||||
Iterable<T> take(int n) => _unsupported('take');
|
||||
Iterable<T> takeWhile(bool f(T e)) => _unsupported('takeWhile');
|
||||
Set<T> toSet() => _unsupported('toSet');
|
||||
Iterable<T> whereType<T>() => _unsupported('whereType');
|
||||
Iterable<T> where(bool f(T e)) => _unsupported('where');
|
||||
|
||||
_unsupported(String method) => throw new UnsupportedError(method);
|
||||
|
|
Loading…
Reference in a new issue