diff --git a/gen/toir.cpp b/gen/toir.cpp index ee4c7c67..64c24bfc 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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 { diff --git a/test/bug78.d b/test/bug78.d new file mode 100644 index 00000000..68a011d1 --- /dev/null +++ b/test/bug78.d @@ -0,0 +1,8 @@ +module bug78; + +void main() +{ + typedef int int_t = 42; + int_t i; + assert(i == int_t.init); +} \ No newline at end of file