[Webkit-unassigned] [Bug 247789] New: new-target Syntax Error
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 11 01:20:20 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=247789
Bug ID: 247789
Summary: new-target Syntax Error
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: p51lee at kaist.ac.kr
// input.js
class x { static { if ( 0 ?. [ { [ Symbol . toPrimitive ] : x => super [ new . target ( ) ] } ] ** 0 ) ; } }
_____________________________________________________________________________________________________________
Hello,
Executing the input.js using JSC throws SyntaxError, but TypeError is expected.
Running the input.js with JSC results in:
---
$ jsc input.js
Exception: SyntaxError: new.target is not valid inside arrow functions in global code.
at input.js:1
---
while other engines behave like:
---
# V8 (used console.log)
$ node input.js
input.js:1
class x { static { if ( 0 ?. [ { [ Symbol . toPrimitive ] : x => super [ new . target ( ) ] } ] ** 0 ) ; } }
^
TypeError: .new.target is not a function
...
Node.js v18.11.0
# GraalJS
$ js input.js
TypeError: <new.target> is not a function
at <js> :=>(input.js:1:73-88)
at <js> :initializer(input.js:1:24-94)
at <js> :program(input.js:1:0-107)
---
WebKit version: 615.1.10
--
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/20221111/f05bdd74/attachment.htm>
More information about the webkit-unassigned
mailing list