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

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

Issue 1895473004: Make dart:core strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | sdk/lib/core/num.dart » ('j') | sdk/lib/core/num.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/iterable.dart
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index dd195023655e93658810725bd989c256ea3c339d..024cd7b84200bfe92d3886640f5ac773347c3d40 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -451,7 +451,7 @@ abstract class Iterable<E> {
* equivalent to `(iterator..moveNext())..current`.
*/
E get first {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -469,7 +469,7 @@ abstract class Iterable<E> {
* without iterating through the previous ones).
*/
E get last {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -486,7 +486,7 @@ abstract class Iterable<E> {
* Throws a [StateError] if `this` is empty or has more than one element.
*/
E get single {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) throw IterableElementError.noElement();
E result = it.current;
if (it.moveNext()) throw IterableElementError.tooMany();
@@ -612,7 +612,7 @@ class _GeneratorIterable<E> extends Iterable<E>
final _Generator<E> _generator;
_GeneratorIterable(this._end, E generator(int n))
: _start = 0,
- _generator = (generator != null) ? generator : _id;
+ _generator = (generator != null) ? generator : _id as _Generator<E>;
Lasse Reichstein Nielsen 2016/04/16 09:58:22 That might need some documentation since the cast
floitsch 2016/04/19 15:36:39 Done.
_GeneratorIterable.slice(this._start, this._end, this._generator);
« no previous file with comments | « no previous file | sdk/lib/core/num.dart » ('j') | sdk/lib/core/num.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698