[Webkit-unassigned] [Bug 183169] New: ReferenceError on constants within {}-block, unless in strict mode
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 27 12:16:44 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=183169
Bug ID: 183169
Summary: ReferenceError on constants within {}-block, unless in
strict mode
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: macOS 10.13
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: maarten at maartenenliesbeth.nl
The following code/syntax throws a ReferenceError
it should be valid es6 where MY_CONST is scoped to the {}-block
{
const MY_CONST = 60000;
function doIt() {
console.log(MY_CONST);
};
doIt();
}
in strict mode it works:
"use strict";
{
const MY_CONST = 60000;
function doIt() {
console.log(MY_CONST);
};
doIt();
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180227/e5e4fff7/attachment.html>
More information about the webkit-unassigned
mailing list