16298, “mppf”, “What should the type of the domain of a slice of a reindex be?”, “2020-08-26T18:21:30Z”
Consider this program that prints out the type of the domain of a slice of a reindex. What should it print out?
var A: [1..10] int = [i in 1..10] i;
proc testfn(X) {
compilerWarning("testfn argument has type ", X.domain._value.type:string);
}
testfn(A.reindex(0..9)[0..2]);
Before PR #16180 it printed
testfn argument has type unmanaged ArrayViewReindexDom(1,int(64),false,int(64),unmanaged DefaultRectangularDom(1,int(64),false),int(64),unmanaged ArrayViewReindexDist(unmanaged DefaultDist,unmanaged DefaultRectangularDom(1,int(64),false),int(64),unmanaged DefaultRectangularDom(1,int(64),false)))
after PR #16180 it prints
aaa.chpl:7: warning: testfn argument has type unmanaged DefaultRectangularDom(1,int(64),false)
This test is based upon test/scan/scanViews.chpl
which PR #16180 caused to print out a different warning. But I am not sure what the right answer here is, hence this issue. The choice here might well have a semantic impact as well for slices of reindexes. I suspect that the original behavior was due in part to issue #16290 but I have not verified that.