"Walter Bright" <newshound1 at digitalmars.com> wrote in message news:fle8mi$1j24$2 at digitalmars.com... > ???? (noshiika) wrote: > > Replace: > >> const(C) c; >> c = new C(1); // error > > with: > > const(C) c = new C(1); Solve: const(C) c; if(someCondition) c = new C(1); else c = new C(2);