redefer-f-i-b-eval.js 695 B

12345678910111213141516171819
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. eval(
  6. 'function outer() {' +
  7. ' var f = "f";' +
  8. ' if (true) {' +
  9. ' let o = { x : function() { if (f !== "f") { WScript.Echo("fail"); throw 1; } } };' +
  10. ' function i() {}' +
  11. ' o.x();' +
  12. ' }' +
  13. '}');
  14. for (var i = 0; i < 100; i++)
  15. arr = [10000];
  16. outer();
  17. WScript.Echo('pass');