On 9/17/2019 8:54 AM, Exil wrote: > @safe: > > void foo(ref int, ref int) { > } > > void test() { > int[5] arr; > > // foo(arr[0], arr[0]); // error here > > foreach(size_t i, ref int a; arr) { > foo(a, arr[i]); // but ok here > } > } That's a problem with the implementation, not the DIP.