bug212755.js 829 B

123456789101112131415161718192021222324252627
  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. // Bug 212755
  6. function test1() {
  7. "some directive"+"";
  8. "use strict";
  9. with ({ }) { } // should be no error
  10. }
  11. test1();
  12. function test2() {
  13. function deferred() {
  14. "some directive";
  15. "use strict";
  16. with ({ }) { } // should be an error in deferred parsing (as well as normal parsing of course)
  17. }
  18. deferred();
  19. }
  20. test2();
  21. WScript.Echo("FAILED"); // should get a parse error in deferred() above