Bug 247434 - Invalid call chained with optional access
Summary: Invalid call chained with optional access
Status: RESOLVED DUPLICATE of bug 247431
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-03 09:15 PDT by Kanguk Lee
Modified: 2022-11-24 17:26 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kanguk Lee 2022-11-03 09:15:34 PDT
// input.js
( { } . x ( ) ?. x ) ;
__________________

Hello,

Executing the input.js using JSC, it is terminated normally.
However, it is expected to throw TypeError since `{ } . x` is not a function.

Running the input.js with JSC gives

---
$ jsc input.js
// no error
---

while other engines behave like

---
# V8
$ node input.js
input.js:1: TypeError: {}.x is not a function
( { } . x ( ) ?. x ) ;
        ^
TypeError: {}.x is not a function
    at input.js:1:9

# GraalJS
$ js input.js
TypeError: (intermediate value).x is not a function
	at <js> :program(input.js:1:2-12)
---


WebKit version: 615.1.10
Comment 1 Radar WebKit Bug Importer 2022-11-07 16:46:34 PST
<rdar://problem/102065911>
Comment 2 Ross Kirsling 2022-11-24 17:26:24 PST
Marking as duplicate as both cases will be addressed with one patch.

*** This bug has been marked as a duplicate of bug 247431 ***