On 5/26/13, Andrei Alexandrescu <[email protected]> wrote:
> class A {
> void fun()
> in { auto oldLen = this.length; }
> out { assert(this.length == oldLen + 1); }
> body { ... }
> }
>
> That was technically difficult to do back then, and fell by the wayside.
> Today it would break too much code to introduce even if feasible.
Perhaps we could support this by allowing qualification of the in block:
out { assert(this.length == in.oldLen + 1); }
"in" is a keyword so it shouldn't break any existing code.