RESOLVED DUPLICATE of bug 163209 187945
Different output compared with other JS engines: can't find variable
https://bugs.webkit.org/show_bug.cgi?id=187945
Summary Different output compared with other JS engines: can't find variable
sunlili
Reported 2018-07-24 00:54:10 PDT
Hello, Running following js code: ----------------------------------- let testCases = [ function() { return { start: 0, end: 100, test: function test() { } }; }, ]; for(let testCase of testCases) { let testInfo = testCase(); function run() { print(testInfo); } run(); } print("BT_FLAG"); ----------------------------------- Output of ch, v8 and firefox: [object Object] BT_FLAG However, output of jsc is: Exception: ReferenceError: Can't find variable: testInfo BT group 2018.7.24
Attachments
Yusuke Suzuki
Comment 1 2018-08-31 04:24:49 PDT
*** Bug 188784 has been marked as a duplicate of this bug. ***
email
Comment 2 2023-05-03 15:30:27 PDT
This bug makes ES6 code unusable if wrapped in a block, such as in Confluence Data Center plugins: https://community.developer.atlassian.com/t/resource-batching-breaks-closure-compiled-es6-code-in-safari/68909 "Different output" is a pretty severe understatement. "Horribly incorrect output" would be more accurate.
Radar WebKit Bug Importer
Comment 3 2023-05-04 08:41:51 PDT
Yusuke Suzuki
Comment 4 2023-05-04 09:09:15 PDT
This is Annex B feature. *** This bug has been marked as a duplicate of bug 163209 ***
Note You need to log in before you can comment on or make changes to this bug.