On Saturday, 31 March 2018 at 19:18:24 UTC, Shachar Shemesh wrote:
struct S { int a;void func(int b) pure {// For some strange reason, this is not considered a pure violation.a+=b; } }
It's the exact equivalent of this code:
void func(ref S s, int b) pure {
S.a += b;
}
And that code is perfectly pure accordion to D rules - it does
not modify any data not reachable through its arguments.
-- Simen
