one path skips constructor

Kagamin spam at here.lot
Sun Jan 13 16:29:27 UTC 2019


---
struct A
{
     int a;
     this(int)
     {
         if(__ctfe)this(0,0); //Error: one path skips constructor
         else a=0;
     }
     this(int,int){ a=1; }
}
---
Is this supposed to not compile?


More information about the Digitalmars-d-learn mailing list