24854, "DanilaFe", "dyno: calls to initializers from other initializers aren't reflected.", "2024-04-15T17:13:44Z"
Consider the following program:
record pair {
type eltTypeOne = int;
type eltTypeTwo = string;
proc init(type eltTypeOne, type eltTypeTwo) {
this.eltTypeOne = eltTypeOne;
this.eltTypeTwo = eltTypeTwo;
}
proc init(type eltTypeBoth) {
this.init(eltTypeBoth, eltTypeBoth);
}
}
var x = new pair(bool);
var y = new pair(bool, bool);
Here, the type of y
is pair(bool, bool)
as expected, but the type of x
is pair(int, string)
. The reason for this is that Dyno doesn't track the changes to the instantiation variables from a nested call to this.init
in the second initializer. This affects ranges, causing the by
operator to return an incorrectly-strided range.