blob: 194b05fa78a42fc0755edeb8641615de6091b5fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
function testObjectVsPrototype() {
function D() {}
var b = D.prototype = {x: 1};
var d = new D;
var arr = [b, b, b, d];
for (var i = 0; i < 4; i++)
arr[i].x = i;
d.y = 12;
assertEq(d.x, 3);
}
testObjectVsPrototype();
|