bug_OS_2903083.js 695 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 test = function () {
  6. function x() { }
  7. {
  8. function x() { }
  9. }
  10. function y() {
  11. }
  12. return eval('new y()');
  13. };
  14. var a, b;
  15. (a = test()) + (b = test());
  16. if (Object.getPrototypeOf(a) === Object.getPrototypeOf(b)) {
  17. WScript.Echo("failed");
  18. } else {
  19. WScript.Echo("passed");
  20. }