2 problems I can't get my head around

jerro a at a.com
Mon Nov 26 06:36:20 PST 2012


> That doesn't work, immutable breaks that test.

You're right. I didn't expect that. It seems that this compiles:

void foo()
{
     immutable a = 1;
     enum b = a;
}

But this doesn't, obviously:

void foo(immutable int a)
{
     enum b = a;
}

I wonder, is this considered a bug? It seems very inconsistent to 
me.


More information about the Digitalmars-d mailing list