mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
Use the location and type of the original index offset
This commit is contained in:
parent
344694551c
commit
07ece2730b
1 changed files with 1 additions and 1 deletions
|
@ -586,7 +586,7 @@ Expression Expression_optimize(Expression e, int result, bool keepLvalue)
|
|||
Expression ex = new AddrExp(ae1.loc, ae1); // &a[i]
|
||||
ex.type = ae1.type.pointerTo();
|
||||
|
||||
Expression add = new AddExp(ae.loc, ex, new IntegerExp(ae.loc, offset, e.type));
|
||||
Expression add = new AddExp(ae.loc, ex, new IntegerExp(ae.e2.loc, offset, ae.e2.type));
|
||||
add.type = e.type;
|
||||
ret = Expression_optimize(add, result, keepLvalue);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue