mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-17 19:07:05 +02:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user