Four things

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue May 3 08:49:47 PDT 2011


On 5/3/11, bearophile <bearophileHUGS at lycos.com> wrote:
> struct Foo {
>     int x;
>     this(int xx) {
>         this.x = xx;
>     }
> }
> void main() {
>     enum f = Foo(10);
> }
>

Perhaps a relevant bug is where a struct-typed enum doesn't call the
struct ctor if it has one, but uses field-by-field initialization
instead. See http://d.puremagic.com/issues/show_bug.cgi?id=5460


More information about the Digitalmars-d-learn mailing list