t1.js 729 B

12345678910111213141516171819
  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. /*
  6. This crashes if GetProperty doesn't correctly invalidate typeWithoutProperty inline-cache field.
  7. */
  8. var a = { w: 1 };
  9. var b = { w: 2 };
  10. a.id = 1;
  11. a.name = 2;
  12. x = a.id; // if this only updates local.type and not typeWithoutProperty we end up with incorrect cached transition
  13. b.id = 3;
  14. y = b.name || 2;
  15. WScript.Echo("ok");