Re: Purity and enum

2012-02-06 Thread Daniel Murphy
I wouldn't hold my breath. "simendsjo" wrote in message news:jgoejk$23j1$1...@digitalmars.com... > On 02/06/2012 11:46 AM, Daniel Murphy wrote: >> "simendsjo" wrote in message >> news:jgo9if$1mg9$1...@digitalmars.com... >>> Should purity be checked at all if used with an enum? >> >> I don't thi

Re: Purity and enum

2012-02-06 Thread simendsjo
On 02/06/2012 11:46 AM, Daniel Murphy wrote: "simendsjo" wrote in message news:jgo9if$1mg9$1...@digitalmars.com... Should purity be checked at all if used with an enum? I don't think so. http://d.puremagic.com/issues/show_bug.cgi?id=6169 https://github.com/D-Programming-Language/dmd/pull/652

Re: Purity and enum

2012-02-06 Thread Daniel Murphy
"simendsjo" wrote in message news:jgo9if$1mg9$1...@digitalmars.com... > Should purity be checked at all if used with an enum? I don't think so. http://d.puremagic.com/issues/show_bug.cgi?id=6169 https://github.com/D-Programming-Language/dmd/pull/652

Purity and enum

2012-02-06 Thread simendsjo
Not sure if this is a bug, or just some missing functionality of pure. void f() pure { enum a = to!string("a"); // some legal compile-time to!() } Gives "to is not pure" The following works: template S(alias v) { enum S = to!string(v); } void g() pure { enum a = S!"a"; } Should purity b