Bug 254504 - javascriptcore has an Inconsistent execution results with object property
Summary: javascriptcore has an Inconsistent execution results with object property
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 16
Hardware: Unspecified macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-27 01:20 PDT by chexiaokang@outlook.com
Modified: 2023-04-03 01:21 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chexiaokang@outlook.com 2023-03-27 01:20:51 PDT
###### Version

safari 16.3 (18614.4.6.1.6)

###### Test case

```js
function foo() {
  var obj = {};
    var p0,p1
      switch (p0) {
        case (p0 = NaN):
        case p1:
          obj.prop = NaN;
          break;
      }
  return obj.prop
};
print(foo())
```

###### Execution steps

    .jsc Testcase.js

###### Output
```
undefined
```

###### Expected result
    NaN
     
###### Description

The correct output of the test case should be `NaN` while javascriptcore yields `undefined` . I think it might be an issue of javascriptcore.
Comment 1 Radar WebKit Bug Importer 2023-04-03 01:21:19 PDT
<rdar://problem/107548435>