blob: 297a97d02494f4c8baedfd1e1e07287031c4ef84 [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 test()
{
var i = 0;
var simple_stackfunc = function() // this can be stack allocated
{
if (i == 0)
{
i++;
return simple_stackfunc();
}
return i;
}
return simple_stackfunc();
}
WScript.Echo(test());
WScript.Echo(test());