diff dmd/TypedefDeclaration.d @ 68:ee3a9f34dc48

final bits of codegen implementation to compile Phobos
author korDen
date Tue, 24 Aug 2010 16:44:34 +0400
parents fd4acc376c45
children 2e2a5c3f943a
line wrap: on
line diff
--- a/dmd/TypedefDeclaration.d	Mon Aug 23 21:21:05 2010 +0400
+++ b/dmd/TypedefDeclaration.d	Tue Aug 24 16:44:34 2010 +0400
@@ -14,11 +14,16 @@
 import dmd.TypeTypedef;
 import dmd.Global;
 import dmd.STC;
+import dmd.Id;
 
 import dmd.backend.SC;
 import dmd.backend.FL;
+import dmd.backend.SFL;
 import dmd.backend.Symbol;
 import dmd.backend.Util;
+import dmd.backend.LIST;
+import dmd.backend.Classsym;
+import dmd.codegen.Util;
 
 class TypedefDeclaration : Declaration
 {
@@ -175,6 +180,18 @@
     Symbol* sinit;
     Symbol* toInitializer()
 	{
-		assert(false);
+		Symbol* s;
+		Classsym* stag;
+
+		if (!sinit)
+		{
+			stag = fake_classsym(Id.ClassInfo);
+			s = toSymbolX("__init", SCextern, stag.Stype, "Z");
+			s.Sfl = FLextern;
+			s.Sflags |= SFLnodebug;
+			slist_add(s);
+			sinit = s;
+		}
+		return sinit;
 	}
 }