Can the regression in function name binding taking priority over a parameter names be fixed for R2 (http://groups.google.com/group/ mozilla.dev.tech.js-engine.rhino/browse_thread/thread/ 11b22a1b66a31717)? Kris
On Feb 27, 10:46 am, Norris Boyd <[email protected]> wrote: > What I hope will be the last release candidate is available for > testing, with only one significant change since the last release > candidate that we found during regression testing here at Google. > > Rhino 1.7R1 had the following (buggy) behavior: > > js> var x = { get foo() { return 3; } }; > js> x.foo > 3 > js> x.foo = 7 > 7 > js> x.foo > 3 > > Earlier release candidates fixed this by overwriting the getter, so > that the value of x.foo in the last line was 7 instead of 3. However, > the draft ES3.1 spec says this should throw a TypeError, so I've > changed this last release candidate to do that behavior instead: > > js> var x = { get foo() { return 3; } }; > js> x.foo > 3 > js> x.foo = 7 > js: "<stdin>", line 7: uncaught JavaScript runtime exception: > TypeError: Cannot set property foo that has only a getter. > > Imporanant note: this also affects getters defined through Rhino's > Java API as well as the "get" syntax above. > > If you want to assign to a property that only has a getter defined, > first delete it: > > js> var x = { get foo() { return 3; } }; > js> x.foo > 3 > js> delete x.foo > true > js> x.foo = 7 > 7 > js> x.foo > 7 > > The latest release candidate is available > atftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2-RC3.zip > > I will release this as the final if there are no issues with the > latest change. > > Thanks, > Norris _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
