diff gen/toir.cpp @ 361:932229a851a4 trunk

[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.
author ChristianK
date Mon, 14 Jul 2008 19:17:25 +0200
parents 926f65e39246
children 4d7495038ae8
line wrap: on
line diff
--- a/gen/toir.cpp	Mon Jul 14 17:26:58 2008 +0200
+++ b/gen/toir.cpp	Mon Jul 14 19:17:25 2008 +0200
@@ -1250,6 +1250,8 @@
 
     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!