Summary: | const decl shadowing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | anton muhin <antonm> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | ager, barraclough, dglazkov, ggaren, oliver | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
anton muhin
2010-01-19 10:58:09 PST
(In reply to comment #0) > Created an attachment (id=46928) [details] > Small test to see how var and const declared properties are shadowed in various > browsers > > http://trac.webkit.org/changeset/47062 added a layout test to check that > shadowing of const declared properties on global object is impossible. However > most of other browsers behave differently---attached HTML shows that FF, Opera > and Safari allow to shadow both var and const declared properties (IE8 didn't > output anything)---and only Safari forbids shadowing of const properties. > > Semantics of shadowing/constness is not quite obvious, so it might be easily > not a bug though. Correction: FF, Opera and <Chromium> allow to shadow both var and const declared properties. |