stricteval3-deferred.js 750 B

1234567891011121314151617181920
  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 a=true;
  6. // eval used as a function name in strict mode
  7. try {
  8. eval('(function(){if(a) { function foo3() {"use strict"; function eval(a) {} }; foo3();}})();');
  9. }
  10. catch(e) {
  11. WScript.Echo(e.message);
  12. }
  13. try {
  14. eval('(function(){if(a) { function foo3() { function eval(a) {"use strict";} }; foo3();}})();');
  15. }
  16. catch(e) {
  17. WScript.Echo(e.message);
  18. }