This issue is filed under the assumption that a promise may resolve/reject/notify/cancel with any number of arguments (or none).
The following will cause an argument count mismatch error to be thrown:
var dfd:Deferred = new Deferred();
Promise.when(dfd.promise);
dfd.resolve();
Easy fix is to modify the inline handlers in .when to take rest parameters. Question is what the expectations should be for the arguments. For example, in testWhen_withFunction, a null argument is expected when a function is passed -- now that'll be an array containing a null.
This issue is filed under the assumption that a promise may resolve/reject/notify/cancel with any number of arguments (or none).
The following will cause an argument count mismatch error to be thrown:
Easy fix is to modify the inline handlers in
.when
to take rest parameters. Question is what the expectations should be for the arguments. For example, intestWhen_withFunction
, anull
argument is expected when a function is passed -- now that'll be anarray
containing anull
.