michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 548671; michael@0: var summary = michael@0: "Don't use a shared-permanent inherited property to implement " + michael@0: "[].length or (function(){}).length"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var a = []; michael@0: a.p = 1; michael@0: var x = Object.create(a); michael@0: assertEq(x.length, 0); michael@0: assertEq(x.p, 1); michael@0: assertEq(a.length, 0); michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");