changeset 124:a939ec89fc72 trunk

[svn r128] function local typedefs were not working
author lindquist
date Wed, 28 Nov 2007 03:34:37 +0100
parents 7f9a0a58394b
children c42d245468ea
files gen/toir.cpp test/bug78.d
diffstat 2 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toir.cpp	Wed Nov 28 03:01:51 2007 +0100
+++ b/gen/toir.cpp	Wed Nov 28 03:34:37 2007 +0100
@@ -104,6 +104,12 @@
         Logger::println("ClassDeclaration");
         DtoForceConstInitDsymbol(e);
     }
+    // typedef
+    else if (TypedefDeclaration* tdef = declaration->isTypedefDeclaration())
+    {
+        Logger::println("TypedefDeclaration");
+        tdef->type->getTypeInfo(NULL);
+    }
     // unsupported declaration
     else
     {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug78.d	Wed Nov 28 03:34:37 2007 +0100
@@ -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