New Issue: The yield intent for map.items() is bugged

16428, “dlongnecke-cray”, “The yield intent for map.items() is bugged”, “2020-09-21T20:21:58Z”

The current yield intent for map.items() is const ref, but it is not possible to yield a tuple expression of separate items by ref today while preserving their refness.


use Map;

proc test() {
  var m: map(int, int);
  m.add(0, 0);

  writeln(m);

  for (k, v) in m.items() {
    k = 128;
    v = 128;
  }

  writeln(m);
}
test();

Outputs:

{0: 0}
{0: 0}

Related issues: