Index: test/codegen/expect/collection/src/iterable_zip.js |
diff --git a/test/codegen/expect/collection/src/iterable_zip.js b/test/codegen/expect/collection/src/iterable_zip.js |
index f4eeecf4ee421a743c51168e87f374da2dff3018..f5026e1340a7a856641dba1d56d6226e3b64cc6b 100644 |
--- a/test/codegen/expect/collection/src/iterable_zip.js |
+++ b/test/codegen/expect/collection/src/iterable_zip.js |
@@ -7,50 +7,62 @@ dart_library.library('collection/src/iterable_zip', null, /* Imports */[ |
'use strict'; |
let dartx = dart.dartx; |
const _iterables = Symbol('_iterables'); |
- class IterableZip extends collection.IterableBase$(core.List) { |
- IterableZip(iterables) { |
- this[_iterables] = iterables; |
- super.IterableBase(); |
- } |
- get iterator() { |
- let iterators = this[_iterables][dartx.map](dart.fn(x => x[dartx.iterator], core.Iterator, [core.Iterable]))[dartx.toList]({growable: false}); |
- return new _IteratorZip(iterators); |
+ const IterableZip$ = dart.generic(function(T) { |
+ class IterableZip extends collection.IterableBase$(core.List$(T)) { |
+ IterableZip(iterables) { |
+ this[_iterables] = iterables; |
+ super.IterableBase(); |
+ } |
+ get iterator() { |
+ let iterators = this[_iterables][dartx.map](dart.fn(x => { |
+ dart.as(x, core.Iterable$(T)); |
+ return x[dartx.iterator]; |
+ }, core.Iterator$(T), [core.Iterable$(T)]))[dartx.toList]({growable: false}); |
+ return new (_IteratorZip$(T))(iterators); |
+ } |
} |
- } |
- dart.setSignature(IterableZip, { |
- constructors: () => ({IterableZip: [IterableZip, [core.Iterable$(core.Iterable)]]}) |
+ dart.setSignature(IterableZip, { |
+ constructors: () => ({IterableZip: [IterableZip$(T), [core.Iterable$(core.Iterable$(T))]]}) |
+ }); |
+ dart.defineExtensionMembers(IterableZip, ['iterator']); |
+ return IterableZip; |
}); |
- dart.defineExtensionMembers(IterableZip, ['iterator']); |
+ let IterableZip = IterableZip$(); |
const _iterators = Symbol('_iterators'); |
const _current = Symbol('_current'); |
- class _IteratorZip extends core.Object { |
- _IteratorZip(iterators) { |
- this[_iterators] = dart.as(iterators, core.List$(core.Iterator)); |
- this[_current] = null; |
- } |
- moveNext() { |
- if (dart.notNull(this[_iterators][dartx.isEmpty])) return false; |
- for (let i = 0; i < dart.notNull(this[_iterators][dartx.length]); i++) { |
- if (!dart.notNull(this[_iterators][dartx.get](i).moveNext())) { |
- this[_current] = null; |
- return false; |
+ const _IteratorZip$ = dart.generic(function(T) { |
+ class _IteratorZip extends core.Object { |
+ _IteratorZip(iterators) { |
+ this[_iterators] = iterators; |
+ this[_current] = null; |
+ } |
+ moveNext() { |
+ if (dart.notNull(this[_iterators][dartx.isEmpty])) return false; |
+ for (let i = 0; i < dart.notNull(this[_iterators][dartx.length]); i++) { |
+ if (!dart.notNull(this[_iterators][dartx.get](i).moveNext())) { |
+ this[_current] = null; |
+ return false; |
+ } |
+ } |
+ this[_current] = core.List$(T).new(this[_iterators][dartx.length]); |
+ for (let i = 0; i < dart.notNull(this[_iterators][dartx.length]); i++) { |
+ this[_current][dartx.set](i, this[_iterators][dartx.get](i).current); |
} |
+ return true; |
} |
- this[_current] = core.List.new(this[_iterators][dartx.length]); |
- for (let i = 0; i < dart.notNull(this[_iterators][dartx.length]); i++) { |
- this[_current][dartx.set](i, this[_iterators][dartx.get](i).current); |
+ get current() { |
+ return this[_current]; |
} |
- return true; |
- } |
- get current() { |
- return this[_current]; |
} |
- } |
- _IteratorZip[dart.implements] = () => [core.Iterator$(core.List)]; |
- dart.setSignature(_IteratorZip, { |
- constructors: () => ({_IteratorZip: [_IteratorZip, [core.List]]}), |
- methods: () => ({moveNext: [core.bool, []]}) |
+ _IteratorZip[dart.implements] = () => [core.Iterator$(core.List$(T))]; |
+ dart.setSignature(_IteratorZip, { |
+ constructors: () => ({_IteratorZip: [_IteratorZip$(T), [core.List$(core.Iterator$(T))]]}), |
+ methods: () => ({moveNext: [core.bool, []]}) |
+ }); |
+ return _IteratorZip; |
}); |
+ let _IteratorZip = _IteratorZip$(); |
// Exports: |
+ exports.IterableZip$ = IterableZip$; |
exports.IterableZip = IterableZip; |
}); |