From 000bba17d1f512ae60a4d1738e8c8e5e9d58c198 Mon Sep 17 00:00:00 2001 From: "pschwartau%netscape.com" Date: Tue, 2 Jul 2002 01:24:34 +0000 Subject: [PATCH] Adding new section authored by martin.honnen@t-online.de from bug 150859. --- js/tests/js1_5/Object/regress-137000.js | 29 ++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/js/tests/js1_5/Object/regress-137000.js b/js/tests/js1_5/Object/regress-137000.js index e62aa4b2a138..20a8a8e274a7 100644 --- a/js/tests/js1_5/Object/regress-137000.js +++ b/js/tests/js1_5/Object/regress-137000.js @@ -40,6 +40,7 @@ * See http://bugzilla.mozilla.org/show_bug.cgi?id=137000 * See http://bugzilla.mozilla.org/show_bug.cgi?id=138708 * See http://bugzilla.mozilla.org/show_bug.cgi?id=150032 +* See http://bugzilla.mozilla.org/show_bug.cgi?id=150859 * */ //----------------------------------------------------------------------------- @@ -169,13 +170,39 @@ actual = obj.getVarA(); // this one was returning 'undefined' expect = 'A'; addThis(); -status = inSection(7); +status = inSection(7); actual = obj.getVarB(); // this one is easy; it never failed expect = 'C'; addThis(); +/* + * By martin.honnen@t-online.de + * From http://bugzilla.mozilla.org/show_bug.cgi?id=150859 + * + * Here the same name is being used for a local var in F + * and as a property name for |F| as an object + * + * Twist: the property is added via another function. + */ +function setFProperty(val) +{ + F.propA = val; +} + +function F() +{ + var propA = 'Local variable in F'; +} + +status = inSection(8); +setFProperty('Hello'); +actual = F.propA; // this was returning 'undefined' +expect = 'Hello'; +addThis(); + + //-----------------------------------------------------------------------------