Mercurial > projects > ldc
diff dmd/declaration.h @ 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 | bc982f1ad106 |
children | 545f54041d91 |
line wrap: on
line diff
--- a/dmd/declaration.h Fri Jan 30 07:51:50 2009 +0100 +++ b/dmd/declaration.h Sun Feb 01 20:20:56 2009 +0100 @@ -278,19 +278,18 @@ /**************************************************************/ -// This is a shell around a back end symbol +// LDC uses this to denote static struct initializers -struct SymbolDeclaration : Declaration +struct StaticStructInitDeclaration : Declaration { - Symbol *sym; StructDeclaration *dsym; - SymbolDeclaration(Loc loc, Symbol *s, StructDeclaration *dsym); + StaticStructInitDeclaration(Loc loc, StructDeclaration *dsym); Symbol *toSymbol(); // Eliminate need for dynamic_cast - SymbolDeclaration *isSymbolDeclaration() { return (SymbolDeclaration *)this; } + StaticStructInitDeclaration *isStaticStructInitDeclaration() { return (StaticStructInitDeclaration *)this; } }; struct ClassInfoDeclaration : VarDeclaration