blob: cd0be83cc8c48f3f17c94160792c35a7c3bb46cd [file] [log] [blame]
function testCallProtoMethod() {
function X() { this.x = 1; }
X.prototype.getName = function () { return "X"; }
function Y() { this.x = 2; }
Y.prototype.getName = function() "Y";
var a = [new X, new X, new X, new X, new Y];
var s = '';
for (var i = 0; i < a.length; i++)
s += a[i].getName();
return s;
}
assertEq(testCallProtoMethod(), 'XXXXY');