On Saturday, 1 July 2017 at 22:16:12 UTC, Timon Gehr wrote:
struct S{
int x;
ref inout(int) foo()inout{
return x;
}
}
void main(){
S s;
s.foo()++; // ok!
const(S) t = s;
import std.stdio;
writeln(t.foo());
// t.foo()++; // error
}
Oh damn. I was not aware that it could behave non-constly. since when does it do that ?
