nestedfnnameargs.js 981 B

123456789101112131415161718192021222324252627282930313233343536
  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(
  7. "function f() {" +
  8. " function foo3() {" +
  9. " function eval(a) {" +
  10. " \"use strict\";" +
  11. " }" +
  12. " };" +
  13. " foo3();" +
  14. "}");
  15. f();
  16. }
  17. catch(e) {
  18. WScript.Echo(e.message);
  19. }
  20. try {
  21. eval(
  22. "function f() {" +
  23. " function foo3() {" +
  24. " function a(eval) {" +
  25. " \"use strict\";" +
  26. " }" +
  27. " };" +
  28. " foo3();" +
  29. "}");
  30. f();
  31. }
  32. catch(e) {
  33. WScript.Echo(e.message);
  34. }