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

Unified Diff: test/dart_codegen/expect/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 | « test/dart_codegen/expect/collection/hash_map.dart ('k') | test/dart_codegen/expect/collection/set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/dart_codegen/expect/collection/iterable.dart
diff --git a/test/dart_codegen/expect/collection/iterable.dart b/test/dart_codegen/expect/collection/iterable.dart
index 7b575a107fcb9f228b11aaf7fecae70d1d53e364..41daebb1451ef29f8a2710ff7357f8bd4c88bb68 100644
--- a/test/dart_codegen/expect/collection/iterable.dart
+++ b/test/dart_codegen/expect/collection/iterable.dart
@@ -84,27 +84,27 @@ part of dart.collection;
return new SkipWhileIterable<E>(this, test);
}
E get first {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
- return DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 127, column 12 of dart:collection/iterable.dart: """, it.current is E, false);
+ return it.current;
}
E get last {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
E result;
do {
- result = DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 137, column 16 of dart:collection/iterable.dart: """, it.current is E, false);
+ result = it.current;
}
while (it.moveNext()); return result;
}
E get single {
- Iterator it = iterator;
+ Iterator<E> it = iterator;
if (!it.moveNext()) throw IterableElementError.noElement();
- E result = DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 145, column 16 of dart:collection/iterable.dart: """, it.current is E, false);
+ E result = it.current;
if (it.moveNext()) throw IterableElementError.tooMany();
return result;
}
@@ -224,7 +224,7 @@ bool growable : true}
Set<E> toSet() => new Set<E>.from(this);
int get length {
assert (this is! EfficientLength); int count = 0;
- Iterator it = iterator;
+ Iterator<E> it = iterator;
while (it.moveNext()) {
count++;
}
@@ -245,27 +245,27 @@ return new SkipIterable<E>(this, n);
return new SkipWhileIterable<E>(this, test);
}
E get first {
-Iterator it = iterator;
+Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
- return DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 323, column 12 of dart:collection/iterable.dart: """, it.current is E, false);
+ return it.current;
}
E get last {
-Iterator it = iterator;
+Iterator<E> it = iterator;
if (!it.moveNext()) {
throw IterableElementError.noElement();
}
E result;
do {
- result = DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 333, column 16 of dart:collection/iterable.dart: """, it.current is E, false);
+ result = it.current;
}
while (it.moveNext()); return result;
}
E get single {
-Iterator it = iterator;
+Iterator<E> it = iterator;
if (!it.moveNext()) throw IterableElementError.noElement();
- E result = DEVC$RT.cast(it.current, dynamic, E, "CompositeCast", """line 341, column 16 of dart:collection/iterable.dart: """, it.current is E, false);
+ E result = it.current;
if (it.moveNext()) throw IterableElementError.tooMany();
return result;
}
« no previous file with comments | « test/dart_codegen/expect/collection/hash_map.dart ('k') | test/dart_codegen/expect/collection/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698