WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
188790
Wrong output when case clause is a conditional expression
https://bugs.webkit.org/show_bug.cgi?id=188790
Summary
Wrong output when case clause is a conditional expression
sunlili
Reported
2018-08-21 05:53:34 PDT
Executing following code : --------------------------------------------- (function() { var f = 0; switch (f) { case ((f = 1)? 0 : 0): print("pass"); break; default: print(f); print("fail"); break; }; })(); print("BT_FLAG"); ---------------------------------------------- Output should be : pass BT_FLAG However, output of JavaScriptCore is : 1 fail BT_FLAG BT_GROUP 2018/8/21
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2020-06-07 07:42:25 PDT
(In reply to sunlili from
comment #0
)
> Output should be : > pass > BT_FLAG
As of
r262695
, JSC is correct. Test:
https://trac.webkit.org/browser/webkit/trunk/JSTests/ChakraCore/test/Basics/switch.js?rev=262695#L55
.
Radar WebKit Bug Importer
Comment 2
2020-06-07 07:43:17 PDT
<
rdar://problem/64089530
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug