struct S
{
int a;
@disable this();
this(int) { a = 1; }
~this() { assert(a !is 0); }
alias a this;
int opCall() { return a; }
}
void main()
{
switch (S.init())
{
case 0:
assert(0); //oops
default:
}
}
Maybe in the first order this is 'calling member function on type' problem.