inst_bug.js 609 B

123456789101112131415161718192021
  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 Failed = false;
  6. function FAIL() { Failed = true; }
  7. function test() {
  8. var x = x instanceof x;
  9. function x() { };
  10. if (x !== false)
  11. FAIL();
  12. };
  13. test();
  14. test();
  15. if (!Failed)
  16. WScript.Echo("Passed");