RESOLVED FIXED 247785
TypeError in parameter destructuring in async function should be a rejected promise
https://bugs.webkit.org/show_bug.cgi?id=247785
Summary TypeError in parameter destructuring in async function should be a rejected p...
Kanguk Lee
Reported 2022-11-11 00:56:56 PST
// input.js async function f (...[ [] ]) { } f().catch(e => print("caught")); _____________________ Hello, Executing the input.js using JSC throws TypeError, but it should print "caught". Running the input.js with JSC results in: --- $ jsc input.js Exception: TypeError: undefined is not an object (evaluating '[ [] ]') f@input.js:1:22 global code@input.js:3:2 --- while other engines behave like: --- # V8 (used console.log) $ node input.js caught # GraalJS $ js input.js caught --- WebKit version: 615.1.10
Attachments
Radar WebKit Bug Importer
Comment 1 2022-11-14 09:44:11 PST
Yijia Huang
Comment 2 2022-11-16 13:38:32 PST
Ross Kirsling
Comment 3 2022-11-16 22:23:07 PST
Hi Kanguk, thanks for your diligent bug reporting lately. It seems like you've been reporting these spec conformance issues to each engine individually, but the ideal approach is really to ensure that there is adequate Test262 coverage (https://github.com/tc39/test262), such that engines can easily notice that there's a new failure. In this particular case, SpiderMonkey is also failing (https://bugzilla.mozilla.org/show_bug.cgi?id=1799288), but having separate bug reports for us and for them means that we're working on a shared goal separately -- in particular, if two engines have misread the spec in the same way, then it's likely that a third will, so it's *crucial* to have a Test262 case ensuring that all engines are understanding the spec correctly. And once you've ensured that a Test262 case exists, if you're still really excited about encouraging a fix in JSC, you could create a bug which points to that failing Test262 case. :D
EWS
Comment 4 2022-11-18 17:54:59 PST
Committed 256864@main (29265f95211b): <https://commits.webkit.org/256864@main> Reviewed commits have been landed. Closing PR #6561 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.