[svn r349] Fixed problems with static arrays of void as well as a static arrays with zero length.

Fixed issues with DMD generated assert statements when using class invariants, generally due to incomplete ASTs.
Removed some dead code.
Added a few comments.
This commit is contained in:
Tomas Lindquist Olsen
2008-07-11 00:17:00 +02:00
parent bace4dd0e7
commit 521de1a47e
8 changed files with 56 additions and 89 deletions
+2
View File
@@ -7682,6 +7682,8 @@ Expression *MinExp::semantic(Scope *sc)
typeCombine(sc); // make sure pointer types are compatible
type = Type::tptrdiff_t;
stride = t2->next->size();
if (!stride)
return new IntegerExp(0, 0, Type::tptrdiff_t);
e = new DivExp(loc, this, new IntegerExp(0, stride, Type::tptrdiff_t));
e->type = Type::tptrdiff_t;
return e;