Error if static array is cast to an array such that oldarraysize % newelemsize != 0.

This commit is contained in:
Christian Kamm 2008-07-29 12:32:01 +02:00
parent 99f1cfef36
commit caa61a5523
4 changed files with 23 additions and 15 deletions

View file

@ -846,7 +846,7 @@ DValue* DtoCast(Loc& loc, DValue* val, Type* to)
return DtoCastClass(val, to);
}
else if (fromtype->ty == Tarray || fromtype->ty == Tsarray) {
return DtoCastArray(val, to);
return DtoCastArray(loc, val, to);
}
else if (fromtype->ty == Tpointer || fromtype->ty == Tfunction) {
return DtoCastPtr(loc, val, to);