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


Shin Fujishiro <rsi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Shin Fujishiro <rsi...@gmail.com> 2010-06-08 18:02:25 PDT 
---
Patch against DMD r526:
====================
--- src/optimize.c
+++ src/optimize.c
@@ -58,10 +58,9 @@ Expression *expandVar(int result, VarDeclaration *v)
             return e;
         }

-        Type *tb = v->type->toBasetype();
         if (result & WANTinterpret ||
             v->storage_class & STCmanifest ||
-            (tb->ty != Tsarray && tb->ty != Tstruct)
+            v->type->isscalar()
            )
         {
             if (v->init)
====================

The if condition is changed so that only scalar constants are expanded. 
Affected types are Tarray, Taarray, Tclass and Tdelegate.  Arrays and
associative arrays should not be expanded (the reported problem); classes and
delegates are not necessary to be expanded.

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

Reply via email to