Menu

#4377 makelist(a+b, [a,b] ,...) doesn't give useful result or error

None
open
nobody
5
2026-03-28
2024-09-20
No
makelist(a+b, [a,b] , [[1,2],[3,4]] ) => [[a,b],[a,b]]

If it's not going to do the "right thing", shouldn't it complain that it can't bind [a,b]?

Discussion

  • Robert Dodier

    Robert Dodier - 2024-09-24

    Looks to me like the bug is in ev -- ev is not calling MSET to handle assignment to nonatomic left-hand side.

    Tracing MSET seems to show MSET isn't called even for mapatoms, e.g. ev(f(x[1]), x[1] = 111. But it looks like fortuitously the result is correct in that case; I didn't investigate.

    I'm inclined to think ev should always call MSET.

     
  • Kris Katterjohn

    Kris Katterjohn - 2024-11-29

    See also the discussion in [#4376].

     

    Related

    Bugs: #4376

  • Kris Katterjohn

    Kris Katterjohn - 2026-03-28

    I've already closed [#4376] as not-a-bug since I posted a comment some time ago showing that that was the documented behavior of ev. I'm inclined to close this ticket as not-a-bug as well for pretty much the same reason, since makelist is directly using ev.

    I'll leave this ticket open for now and close at a later date if there is no further discussion.

     

    Related

    Bugs: #4376


Log in to post a comment.

MongoDB Logo MongoDB