[Issue 923] No constant folding for template value default arguments, D1 only

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 13 04:43:08 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=923


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
            Summary|No constant folding for     |No constant folding for
                   |template value default      |template value default
                   |arguments                   |arguments, D1 only




--- Comment #2 from Don <clugdbug at yahoo.com.au>  2009-08-13 04:43:06 PDT ---
This has already been fixed in D2. Here's the patch for D1.046. It's trivial.

Index: template.c
===================================================================
--- template.c    (revision 192)
+++ template.c    (working copy)
@@ -3951,6 +3951,7 @@
     {   sinteger_t v;
         real_t r;

+        ea = ea->optimize(WANTvalue | WANTinterpret);
         if (ea->op == TOKvar)
         {
         sa = ((VarExp *)ea)->var;

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


More information about the Digitalmars-d-bugs mailing list