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

Unified Diff: tool/input_sdk/lib/collection/iterable.dart

Issue 1122313002: Typing fixes to eliminate casts/dcalls (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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 | « tool/input_sdk/lib/collection/hash_map.dart ('k') | tool/input_sdk/lib/collection/set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/collection/iterable.dart
diff --git a/tool/input_sdk/lib/collection/iterable.dart b/tool/input_sdk/lib/collection/iterable.dart
index 154d19c2ddee9180cdcb9137cf4d3b3270d1fe7d..8020e7e68fa82012d4dc897efafc1405295f636e 100644
--- a/tool/input_sdk/lib/collection/iterable.dart
+++ b/tool/input_sdk/lib/collection/iterable.dart
@@ -120,7 +120,7 @@ abstract class IterableMixin<E> implements Iterable<E> {
}
E get first {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -128,7 +128,7 @@ abstract class IterableMixin<E> implements Iterable<E> {
}
E get last {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -140,7 +140,7 @@ abstract class IterableMixin<E> implements Iterable<E> {
}
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();
@@ -288,7 +288,7 @@ abstract class IterableBase<E> implements Iterable<E> {
int get length {
assert(this is! EfficientLength);
int count = 0;
- Iterator it = iterator;
+ Iterator<E> it = iterator;
while (it.moveNext()) {
count++;
}
@@ -316,7 +316,7 @@ abstract class IterableBase<E> implements Iterable<E> {
}
E get first {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -324,7 +324,7 @@ abstract class IterableBase<E> implements Iterable<E> {
}
E get last {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
@@ -336,7 +336,7 @@ abstract class IterableBase<E> implements Iterable<E> {
}
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();
« no previous file with comments | « tool/input_sdk/lib/collection/hash_map.dart ('k') | tool/input_sdk/lib/collection/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698