New Issue: iteration over a uint(32) range yield int(32)s

19958, "mppf", "iteration over a uint(32) range yield int(32)s", "2022-06-08T11:30:27Z"

Summary of Problem

It seems to be that iterating over a uint/uint(32) range yields the corresponding signed type (int/uint(32)). I would expect it to yield the same type as the index type.

Ranges — Chapel Documentation 1.26 seems to imply that the stride is signed but the index type would remain unsigned in this case.

Steps to Reproduce

Source Code:

var u32:uint(32) = 2;
writeln("iterating over 0..#u32");
for x in 0..#u32 {
  writeln(x, ":", x.type:string);

var u64:uint(64) = 2;
writeln("iterating over 0..#u64");
for x in 0..#u64 {
  writeln(x, ":", x.type:string);
$ chpl cc.chpl  && ./cc
iterating over 0..#u32
iterating over 0..#u64

Associated Future Test(s):