RESOLVED DUPLICATE of bug 213715 216817
A question about TypedArray.prototype.lastIndexOf
https://bugs.webkit.org/show_bug.cgi?id=216817
Summary A question about TypedArray.prototype.lastIndexOf
NWU_NISL
Reported 2020-09-22 01:32:40 PDT
According to ES10.0, "%TypedArray%.prototype.lastIndexOf" is a distinct function that implements the same algorithm as "Array.prototype.lastIndexOf". And it's optimization must not introduce any observable changes in the specified behaviour of the algorithm. But these two methods acts differently when no argument is passed. Is this an issue about javascriptCore? #### version dbae081 #### command webkit/WebKitBuild/Debug/bin/jsc testcase.js #### testcase var v1 = []; print(v1.lastIndexOf()); var v2 = new Uint8Array(); print(v2.lastIndexOf()); #### output -1 TypeError: Expected at least one argument #### expected output -1 -1 contributor:Yuan Wang
Attachments
Radar WebKit Bug Importer
Comment 1 2020-09-22 15:42:26 PDT
Keith Miller
Comment 2 2020-09-22 16:02:55 PDT
Hi there, thanks for reporting this issue. You're correct! That does indeed look like a bug. Seems like it should be simple to fix.
Keith Miller
Comment 3 2020-09-22 16:08:23 PDT
Actually, looks like this was fixed a while ago in https://bugs.webkit.org/show_bug.cgi?id=213715 Regardless, thanks again for the report! *** This bug has been marked as a duplicate of bug 213715 ***
Note You need to log in before you can comment on or make changes to this bug.