| Summary: | Different output compared with other JS engines: can't find variable | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | sunlili |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | email, fpizlo, mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
*** Bug 188784 has been marked as a duplicate of this bug. *** 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. This is Annex B feature. *** This bug has been marked as a duplicate of bug 163209 *** |
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