ref int bump(ref int x) { return ++x; } unittest { int x = 1; bump(bump(x)); // Два увеличения на 1 assert(x == 3); }