diff dmd/mtype.c @ 139:0ab29b838084 trunk

[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :) Fixed: tango.io.Console seems to be working now.
author lindquist
date Tue, 22 Jan 2008 00:01:16 +0100
parents 0e28624814e8
children 5c17f81fc1c1
line wrap: on
line diff
--- a/dmd/mtype.c	Fri Jan 18 20:13:19 2008 +0100
+++ b/dmd/mtype.c	Tue Jan 22 00:01:16 2008 +0100
@@ -3973,6 +3973,15 @@
     return sym->basetype->dotExp(sc, e, ident);
 }
 
+Expression *TypeTypedef::getProperty(Loc loc, Identifier *ident)
+{
+    if (ident == Id::init)
+    {
+	return Type::getProperty(loc, ident);
+    }
+    return sym->basetype->getProperty(loc, ident);
+}
+
 int TypeTypedef::isbit()
 {
     return sym->basetype->isbit();
@@ -4276,6 +4285,18 @@
 	return e;
     }
 
+    TemplateInstance *ti = s->isTemplateInstance();
+    if (ti)
+    {	if (!ti->semanticdone)
+	    ti->semantic(sc);
+	s = ti->inst->toAlias();
+	if (!s->isTemplateInstance())
+	    goto L1;
+	Expression *de = new DotExp(e->loc, e, new ScopeExp(e->loc, ti));
+	de->type = e->type;
+	return de;
+    }
+
     d = s->isDeclaration();
 #ifdef DEBUG
     if (!d)
@@ -4646,6 +4667,18 @@
 	return e;
     }
 
+    TemplateInstance *ti = s->isTemplateInstance();
+    if (ti)
+    {	if (!ti->semanticdone)
+	    ti->semantic(sc);
+	s = ti->inst->toAlias();
+	if (!s->isTemplateInstance())
+	    goto L1;
+	Expression *de = new DotExp(e->loc, e, new ScopeExp(e->loc, ti));
+	de->type = e->type;
+	return de;
+    }
+
     d = s->isDeclaration();
     if (!d)
     {