| Index: pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
|
| diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
|
| index 6aafacda89e55a1c01dfb8293d0d17f53d156e66..910858fd7bd8f345404b8166749768ff6726fc10 100644
|
| --- a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
|
| +++ b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
|
| @@ -56,8 +56,15 @@ class Function {
|
| static apply(Function f,
|
| List positionalArguments,
|
| [Map<Symbol, dynamic> namedArguments]) {
|
| - // TODO(vsm): Handle named args:
|
| - // https://github.com/dart-lang/sdk/issues/27257
|
| + positionalArguments ??= [];
|
| + // dcall expects the namedArguments as a JS map in the last slot.
|
| + if (namedArguments != null && namedArguments.isNotEmpty) {
|
| + var map = JS('', '{}');
|
| + namedArguments.forEach((symbol, arg) {
|
| + JS('', '#[#] = #', map, _symbolToString(symbol), arg);
|
| + });
|
| + positionalArguments = new List.from(positionalArguments)..add(map);
|
| + }
|
| return JS('', 'dart.dcall.apply(null, [#].concat(#))', f, positionalArguments);
|
| }
|
|
|
|
|