28929, "bradcray", "For expressions can't currently be invoked with square bracket loops", "2026-06-03T23:19:11Z"
It seems that for-loop expressions can't currently necessarily be invoked with square bracket loops, though it seems they should be able to. Here's an example:
foo(for i in 1..10 do i);
proc foo(x: _iteratorRecord) {
var arr = [val in x] val;
writeln(arr);
}
Since square bracket loops are meant to be parallel when possible and to fall back to serial execution otherwise, this seems as though it ought to work, so I'm considering this a bug.
A potential workaround for a case like the above would be to do var arr = val;; but other cases may not have such a workaround (particularly if the square bracket loop is in code that can't be modified).
Note that this is not currently important to me or blocking me in any way; just capturing it having encountered it and been surprised.