blob: 2b2d6b37298f8ebcf4e5f9da6f0c4414e1077812 [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.
//-------------------------------------------------------------------------------------------------------
function f()
{
var v0 = 1;
var o = { [v0++] : v0 };
if (o[1] !== 2)
{
WScript.Echo('fail1: o[1] === ', o[1]);
}
}
f();
function g()
{
var v0 = 1;
var o = { [v0++] : v0 };
function h() { return v0; }
if (o[1] !== 2)
{
WScript.Echo('fail2: o[1] ===', o[1]);
}
}
g();
function h()
{
var v0 = 1;
var o = { [v0] : v0 = 2};
function h() {}
if (o[1] !== 2)
{
WScript.Echo('fail3: o[1] === ', o[1]);
}
}
h();
WScript.Echo('pass');