[Webkit-unassigned] [Bug 6639] New: for...in returns duplicate keys when used with prototype inheritance

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Tue Jan 17 20:52:55 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=6639

           Summary: for...in returns duplicate keys when used with prototype
                    inheritance
           Product: WebKit
           Version: 412+
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: jesse at cozgood.com


The following code evaluates to "toString toString", however, for...in should never return duplicate keys.

var A = function() {};
A.prototype.toString = function() { "A" };

var B = function() {};
B.prototype = new A();
B.prototype.toString = function() { "B" };

var s = "";
for (var f in B.prototype) s += f + " ";
s

-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list