[Issue 4177] __ctfe can't be used in pure functions

2010-08-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4177


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2010-08-28 
14:55:16 PDT ---
http://www.dsource.org/projects/dmd/changeset/646

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4177] __ctfe can't be used in pure functions

2010-06-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4177


Don  changed:

   What|Removed |Added

   Keywords||patch
 CC||clugd...@yahoo.com.au
Version|future  |2.041


--- Comment #1 from Don  2010-06-08 11:38:37 PDT ---
Since __ctfe is so magical and unique, it seems justified to give it one more
special case. Other approaches I tried (changing the storage_class of __ctfe) 
were far more complicated.

PATCH expression.c, VarExp::semantic(), line 4397.

+/* Magic variable __ctfe never violates pure or safe
+ */
+if (v->ident == Id::ctfe)
+return this;

/* If ANY of its enclosing functions are pure,
 * it cannot do anything impure.
 * If it is pure, it cannot access any mutable variables other
 * than those inside itself
 */

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---