Mercurial > projects > ldc
diff dmd/expression.c @ 876:27a379f288bf
Merged DMD 1.039
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 07 Jan 2009 19:34:48 +0100 |
parents | 330f999ade44 |
children | ea82e2077f9d |
line wrap: on
line diff
--- a/dmd/expression.c Tue Jan 06 16:33:51 2009 +0100 +++ b/dmd/expression.c Wed Jan 07 19:34:48 2009 +0100 @@ -3306,6 +3306,12 @@ this->type = type; } +Expression *TypeExp::syntaxCopy() +{ + //printf("TypeExp::syntaxCopy()\n"); + return new TypeExp(loc, type->syntaxCopy()); +} + Expression *TypeExp::semantic(Scope *sc) { //printf("TypeExp::semantic(%s)\n", type->toChars()); @@ -7239,7 +7245,7 @@ else s = t->toChars(); error("%s cannot be sliced with []", s); - type = Type::terror; + e = new IntegerExp(0); return e; }