[Webkit-unassigned] [Bug 160955] [ES2016] Allow assignment in for-in head in not-strict mode
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 24 07:38:01 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160955
--- Comment #16 from GSkachkov <gskachkov at gmail.com> ---
Comment on attachment 286755
--> https://bugs.webkit.org/attachment.cgi?id=286755
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=286755&action=review
>>> JSTests/stress/for-in-tests.js:161
>>> + };
>>
>> can you also add this test to make sure if throws a runtime exception when we write to the const variable:
>> foo = function(a, b) {
>> {
>> const p = 'some-value';
>> for (var p = b in a) { }
>> }
>> }
>
> Correction: *when we try to write*, we should not successfully write to it.
It is already there. See line 205, but there will be Syntax error: 'Cannot declare a var variable that shadows a let/const/class variable: '.
I'll land patch, if there is need another test I'll add as new patch.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160824/323d3774/attachment.html>
More information about the webkit-unassigned
mailing list