[Webkit-unassigned] [Bug 241088] Promise.race(123); does not throw an error
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 7 06:32:29 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=241088
--- Comment #3 from 845043157 at qq.com ---
When I run the follow program:
1.js:
Promise.race(123);
print(1);
V8:
1
1.js:1: TypeError: number 123 is not iterable (cannot read property Symbol(Symbol.iterator))
Promise.race(123);
^
TypeError: number 123 is not iterable (cannot read property Symbol(Symbol.iterator))
at Function.race (<anonymous>)
at 1.js:1:9
spidermonkey:
1
Unhandled rejection: (new TypeError("Argument of Promise.race is not iterable", "1.js", 1))
Stack:
@1.js:1:9
jsc:
1
'Promise.race(123);' is wrong code but the output of jsc looks like it is ok.I think it may be better to throw an error or warning tell users the code is wrong.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220607/dbb5582c/attachment-0001.htm>
More information about the webkit-unassigned
mailing list