ES6NewTarget_bugfixes.js 968 B

123456789101112131415161718192021222324
  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. WScript.LoadScriptFile("..\\UnitTestFramework\\UnitTestFramework.js");
  6. var tests = [
  7. {
  8. name: "OS4497597: ScopeInfo::FromScope() should increment scope symbol count to accomodate 'new.target'",
  9. body: function () {
  10. (function (){
  11. function f() {}
  12. eval("");
  13. () =>new.target;
  14. })();
  15. // Repro:
  16. // ASSERTION : (jscript\core\lib\Runtime\ByteCode\ScopeInfo.h, line 68)
  17. // Failure: (i >= 0 && i < symbolCount)
  18. }
  19. },
  20. ];
  21. testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });