Worked in DMD2.034, fails on 2.035 and later. And where the heck did the type int come from??? ---- struct CopyTest { double x; } enum CopyTest z = CopyTest(5.3); enum CopyTest w = z; ------ bug.d(6): Error: cannot implicitly convert expression ((CopyTest)(5.3)) of type int to CopyTest
ROOT CAUSE: This was a bug in my patch to bug 3190. PATCH: expression.c, DsymbolExp::semantic(), line 2359. if ((v->storage_class & STCmanifest) && v->init) { e = v->init->toExpression(); - e->semantic(sc); + e = e->semantic(sc); return e; }
Changeset 332
fixed dmd 2.040