mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 03:16:05 +03:00
Error if static array is cast to an array such that oldarraysize % newelemsize != 0.
This commit is contained in:
parent
99f1cfef36
commit
caa61a5523
4 changed files with 23 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue