argassignbug.js 685 B

12345678910111213141516171819202122232425
  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 m()
  6. {
  7. "use asm"
  8. function a(x, y)
  9. {
  10. x = x|0
  11. y = y|0
  12. return (x + y)|0
  13. }
  14. function b()
  15. {
  16. var x = 1
  17. var y = 2
  18. return a(x, (x=y, y)|0)|0
  19. }
  20. return b
  21. }
  22. let result = m()()
  23. print((result == 3) ? "Pass" : "Fail")