Chromium Code Reviews| Index: lib/runtime/dart_runtime.js |
| diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js |
| index cd602b4add7d1c6c1e51524d7c531210d0dd2bc6..255d61964ea7f6c2923ccc2f359d1333c4eb336e 100644 |
| --- a/lib/runtime/dart_runtime.js |
| +++ b/lib/runtime/dart_runtime.js |
| @@ -565,8 +565,13 @@ var dart, _js_helper, _js_primitives; |
| if (arguments.length == 1) { |
| // No type arguments, it's all dynamic |
| let len = closure.length; |
| - let args = Array.apply(null, new Array(len)).map(() => dart.dynamic); |
| - t = functionType(dart.dynamic, args); |
| + function build() { |
| + let args = Array.apply(null, new Array(len)).map(() => core.Object); |
| + return functionType(core.Object, args); |
| + } |
| + // We could be called before Object is defined. |
| + if (core.Object === void 0) return fn(closure, build); |
| + t = build(); |
| } else { |
| // We're passed the piecewise components of the function type, |
| // construct it. |
| @@ -958,6 +963,10 @@ var dart, _js_helper, _js_primitives; |
| throw Error('requires ' + length + ' or 0 type arguments'); |
| } |
| let args = Array.prototype.slice.call(arguments); |
| + // TODO(leafp): This should really be core.Object for |
| + // consistency, but Object is not attached to core |
| + // until the entire core library has been processed, |
| + // which is too late. |
|
vsm
2015/05/21 20:08:47
John and I were just discussing this. I *think* t
Leaf
2015/05/21 22:47:34
It either needs to stay as dynamic, or get canonic
vsm
2015/05/22 15:52:04
Ah, I was thinking that the reified type of any ob
|
| while (args.length < length) args.push(dart.dynamic); |
| let value = resultMap; |