DMD 2.055head gives no compile-time errors on this, is this expected and good/acceptable?
struct Foo {
int x;
this(int x_) { this.x = x_; }
}
void main() {
auto f1 = new const(Foo)(1);
f1.x++;
auto f2 = new immutable(Foo)(1);
f2.x++;
auto f3 = const(Foo)(1);
f3.x++;
auto f4 = immutable(Foo)(1);
f4.x++;
}
Bye and thank you,
bearophile