blob: 78be013f7f99fe7bc23c3227b3150818fc8b6b26 [file] [log] [blame]
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// Make sure assign to the object kill it's field's value for field copy prop.
function f(o)
{
var v = 0;
for (var i = 0; i < 10; i++)
{
var a = o.x;
o = o.y;
var b = o.x;
v += a + b;
}
return v;
}
var o = new Object();
o.x = -1;
var a = o;
for (var i = 0; i < 10; i++)
{
o.y = new Object();
o = o.y;
o.x = i;
}
o.y = a;
WScript.Echo(f(a) == 80? "PASS" : "FAIL");