comma_bug219390.js 855 B

123456789101112131415161718
  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. (function(){ "use strict", delete z; })(); // Ignore use strict directive with a comma
  6. (function(){ "invalid" + "use strict"; delete z; })();
  7. (function(){ delete z; "use strict"; delete z; })();
  8. (function(){ 0123; "use strict"; delete z; })();
  9. try {
  10. eval("(function(eval){ \"use strict\" })();");
  11. } catch (e) {
  12. WScript.Echo(e);
  13. }
  14. (function(){ "use strict" + "use strict"; delete z; });
  15. (function(){ "use strict", "use strict"; delete z;});
  16. WScript.Echo("Pass");