BugFix2214646.js 779 B

12345678910111213141516171819202122232425262728
  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. var pass = true;
  6. function test() {
  7. var c = function () {};
  8. function shapeyConstructor()
  9. {
  10. for (var x in Array(c = '', ...NaN, c = '')) {}
  11. }
  12. try
  13. {
  14. var f = shapeyConstructor();
  15. } catch (e) {}
  16. if(typeof c !== "string")
  17. {
  18. print("FAIL: type of is "+typeof c);
  19. pass = false;
  20. }
  21. }
  22. test();
  23. test();
  24. test();
  25. pass ? print("PASS") : print("FAIL");