diff dmd/declaration.c @ 913:29c0d1194033

Fix #198 and #199 by making CTFE on static struct initializers work. Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
author Christian Kamm <kamm incasoftware de>
date Sun, 01 Feb 2009 20:20:56 +0100
parents 340acf1535d0
children 545f54041d91
line wrap: on
line diff
--- a/dmd/declaration.c	Fri Jan 30 07:51:50 2009 +0100
+++ b/dmd/declaration.c	Sun Feb 01 20:20:56 2009 +0100
@@ -1408,4 +1408,13 @@
     return NULL;
 }
 
+/********************** StaticStructInitDeclaration ***************************/
 
+StaticStructInitDeclaration::StaticStructInitDeclaration(Loc loc, StructDeclaration *dsym)
+    : Declaration(new Identifier("", TOKidentifier))
+{
+    this->loc = loc;
+    this->dsym = dsym;
+    storage_class |= STCconst;
+}
+