WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 31813
33849
const decl shadowing
https://bugs.webkit.org/show_bug.cgi?id=33849
Summary
const decl shadowing
anton muhin
Reported
2010-01-19 10:58:09 PST
Created
attachment 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.
Attachments
Small test to see how var and const declared properties are shadowed in various browsers
(761 bytes, text/html)
2010-01-19 10:58 PST
,
anton muhin
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
anton muhin
Comment 1
2010-01-19 10:59:21 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.
Gavin Barraclough
Comment 2
2012-03-07 00:33:04 PST
We should resolved this by implementing ES Harmony block scoped const. *** This bug has been marked as a duplicate of
bug 31813
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug