Comment #0 by iamthewilsonator — 2018-08-06T08:46:33Z
struct Foo
{
int i;
this (int ii)
{
this.i = i;
}
}
void main()
{
auto foo = Foo(2);
import std.stdio : writeln;
writeln(foo); // prints Foo(0);
}
should error or at least warn. It leads to very confusing behaviours (you think i is assigned but its not).
Comment #1 by robert.schadek — 2024-12-13T19:00:08Z