[svn r128] function local typedefs were not working

This commit is contained in:
Tomas Lindquist Olsen
2007-11-28 03:34:37 +01:00
parent 667b6339f3
commit c4d1ae5d54
2 changed files with 14 additions and 0 deletions

View File

@@ -104,6 +104,12 @@ DValue* DeclarationExp::toElem(IRState* p)
Logger::println("ClassDeclaration");
DtoForceConstInitDsymbol(e);
}
// typedef
else if (TypedefDeclaration* tdef = declaration->isTypedefDeclaration())
{
Logger::println("TypedefDeclaration");
tdef->type->getTypeInfo(NULL);
}
// unsupported declaration
else
{

8
test/bug78.d Normal file
View File

@@ -0,0 +1,8 @@
module bug78;
void main()
{
typedef int int_t = 42;
int_t i;
assert(i == int_t.init);
}