blob: babe71a71260139266125c9d2171e1c81eeaac33 [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.
//-------------------------------------------------------------------------------------------------------
var c = 1;
function foo(hint) {
return c;
}
var a = {};
a[Symbol.toPrimitive] = foo;
function foobar()
{
var b = 0;
for(i = 0; i < 1000; i++)
{
b +=a;
}
}
foobar();
c = {valueOf() { return 0}}
foobar();
WScript.Echo("PASS");