r.js 734 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. try {
  6. eval("{const x = 1;}WScript.Echo(x);");
  7. } catch(e) {
  8. WScript.Echo(e);
  9. }
  10. // Bugs 26565, 26558
  11. // Code for const/let tracks assignments to identifiers. Ensure that the tracking tracks identifier foo in this case and
  12. // not the integer constant 0 which doesn't have a pid
  13. try {
  14. eval("--foo 0");
  15. } catch(e) {
  16. WScript.Echo(e);
  17. }