//----
struct S
{
@disable this(this)
//{assert(false);}
;
}
struct SS1
{
S s;
}
struct SS2
{
S s;
this(this){}
}
void main()
{
S s;
SS1 ss1 = SS1(s);
SS2 ss2 = SS2(s);
}
//----
Produces:
//----
main.obj(main)
Error 42: Symbol Undefined _D4main1S10__postblitMFZv
//----
We can uncomment the postblit implementation, it which case it will link, and throw the assert during the runtime.
I'd expect, in both cases, for the code to not compile.
Marking as critical, since the compiler is clearly calling something it shouldn't. Furthermore, since the error is a link error, there is no way to catch this in conditional compilation.