[Issue 6072] [CTFE] Regression(git master): Cannot declare variable inside an 'if' condition
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 29 07:37:15 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6072
--- Comment #1 from kennytm at gmail.com 2011-05-29 07:32:54 PDT ---
To workaround this fors std.traits.functionAttributes:
diff --git a/std/traits.d b/std/traits.d
index 47ee059..67f14ad 100644
--- a/std/traits.d
+++ b/std/traits.d
@@ -89,7 +89,8 @@ private
// FuncAttr --> empty | Na | Nb | Nc | Nd | Ne | Nf
while (mstr.length >= 2 && mstr[0] == 'N')
{
- if (FunctionAttribute att = LOOKUP_ATTRIBUTE[ mstr[1] ])
+ FunctionAttribute att = LOOKUP_ATTRIBUTE[ mstr[1] ];
+ if (att)
{
atts |= att;
mstr = mstr[2 .. $];
--
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