mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 09:33:27 +01:00
[svn r382] In CastExp, after the cast to CastExp.to force the type to be CastExp.type.
This is used for c.im for instance, where the cast is to idouble but type is double.
This commit is contained in:
@@ -1250,6 +1250,8 @@ DValue* CastExp::toElem(IRState* p)
|
||||
|
||||
DValue* u = e1->toElem(p);
|
||||
DValue* v = DtoCast(u, to);
|
||||
// force d type to this->type
|
||||
v->getType() = type;
|
||||
|
||||
if (v->isSlice()) {
|
||||
// only valid as rvalue!
|
||||
|
||||
Reference in New Issue
Block a user