RESOLVED FIXED 251760
Functions are lexically scoped inside static blocks where variable declarations are allowed, ASSERT_WITH_MESSAGE(!m_declaredVariables.size(), "...");
https://bugs.webkit.org/show_bug.cgi?id=251760
Summary Functions are lexically scoped inside static blocks where variable declaratio...
Corban Amouzou
Reported 2023-02-05 11:48:11 PST
In Source/JavaScriptCore/parser/Parser.h we hit the assertion: ASSERT_WITH_MESSAGE(!m_declaredVariables.size(), "..."); This is triggered by a simple case where a class function is declared inside of a static scope: class A { static { var B; function C() {} } } What's interesting is that I would assume the variables inside that block would be scoped to that class statically, IE the variable B would be accessible through A.B, but that simply is not the case. It's not a pressing concern, but it seems like a possible regression of https://bugs.webkit.org/show_bug.cgi?id=168844
Attachments
Radar WebKit Bug Importer
Comment 1 2023-02-06 16:29:15 PST
Yijia Huang
Comment 2 2023-02-06 18:05:01 PST
EWS
Comment 3 2023-02-07 13:44:16 PST
Committed 259981@main (b9e63fd65e32): <https://commits.webkit.org/259981@main> Reviewed commits have been landed. Closing PR #9729 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.