Mercurial > projects > ldc
diff gen/toir.cpp @ 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 | 7f6eeb7b003e |
children | a69941a2c470 |
line wrap: on
line diff
--- a/gen/toir.cpp Fri Jan 30 07:51:50 2009 +0100 +++ b/gen/toir.cpp Sun Feb 01 20:20:56 2009 +0100 @@ -179,7 +179,7 @@ } return new DFuncValue(fdecl, func); } - else if (SymbolDeclaration* sdecl = var->isSymbolDeclaration()) + else if (StaticStructInitDeclaration* sdecl = var->isStaticStructInitDeclaration()) { // this seems to be the static initialiser for structs Type* sdecltype = sdecl->type->toBasetype(); @@ -205,7 +205,7 @@ { Logger::print("VarExp::toConstElem: %s | %s\n", toChars(), type->toChars()); LOG_SCOPE; - if (SymbolDeclaration* sdecl = var->isSymbolDeclaration()) + if (StaticStructInitDeclaration* sdecl = var->isStaticStructInitDeclaration()) { // this seems to be the static initialiser for structs Type* sdecltype = sdecl->type->toBasetype();