| Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| index 674993a1a37d40b1ccda02700465db71af65d846..e3131b9352e129ff8f473dedc4397a51e2a597b7 100644
|
| --- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| +++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| @@ -19094,12 +19094,14 @@
|
| return completer.future;
|
| };
|
| }
|
| - static forEach(input, f) {
|
| - let iterator = input[dartx.iterator];
|
| - return async.Future.doWhile(dart.fn(() => {
|
| - if (!dart.test(iterator.moveNext())) return false;
|
| - return async.Future.sync(dart.fn(() => dart.dcall(f, iterator.current), VoidTodynamic$())).then(core.bool)(dart.fn(_ => true, dynamicTobool$()));
|
| - }, VoidToObject$()));
|
| + static forEach(T) {
|
| + return (input, f) => {
|
| + let iterator = input[dartx.iterator];
|
| + return async.Future.doWhile(dart.fn(() => {
|
| + if (!dart.test(iterator.moveNext())) return false;
|
| + return async.Future.sync(dart.fn(() => f(iterator.current), VoidTodynamic$())).then(core.bool)(dart.fn(_ => true, dynamicTobool$()));
|
| + }, VoidToObject$()));
|
| + };
|
| }
|
| static doWhile(f) {
|
| let doneSignal = new async._Future();
|
| @@ -19129,7 +19131,7 @@
|
| statics: () => ({
|
| wait: dart.definiteFunctionType(T => [async.Future$(core.List$(T)), [core.Iterable$(async.Future$(T))], {eagerError: core.bool, cleanUp: dart.functionType(dart.void, [T])}]),
|
| any: dart.definiteFunctionType(T => [async.Future$(T), [core.Iterable$(async.Future$(T))]]),
|
| - forEach: dart.definiteFunctionType(async.Future, [core.Iterable, dynamicTodynamic()]),
|
| + forEach: dart.definiteFunctionType(T => [async.Future, [core.Iterable$(T), dart.functionType(dart.dynamic, [T])]]),
|
| doWhile: dart.definiteFunctionType(async.Future, [VoidTodynamic()])
|
| }),
|
| names: ['wait', 'any', 'forEach', 'doWhile']
|
|
|