16300, “mppf”, “What domain should be used for iterator expressions over reindexed arrays?”, “2020-08-26T20:13:08Z”
Consider the following example program which creates variable initialized from a promoted expression from a reindexed array.
What domain should the domain of the new array be?
var A: [1..10] int = [i in 1..10] i;
var B = A.reindex(0..9) + 1;
writeln(B.domain._value.type:string);
Currently this program prints out the reindexed domain. However, since the iterator expression is being stored into a new array, my intuition is that the new array should not have a view domain. In that event, it would print out DR domain. (Or whatever the reindexed domain would be, when stored into a user variable).