diff gen/toir.cpp @ 201:8f9191180c7a trunk

[svn r217] Updated: the rebuild profiles. Fixed: way to find class data fields was too strict type wise. Fixed: foreach resulting in an implicit delegate could fail.
author lindquist
date Mon, 12 May 2008 22:44:25 +0200
parents bfcb657756f6
children e881c9b1c738
line wrap: on
line diff
--- a/gen/toir.cpp	Mon May 12 22:27:05 2008 +0200
+++ b/gen/toir.cpp	Mon May 12 22:44:25 2008 +0200
@@ -1246,7 +1246,10 @@
         return v;
     }
 
-    else if (u->isLRValue() || (u->isVar() && u->isVar()->lval))
+    else if (DLRValue* lr = u->isLRValue())
+        return new DLRValue(lr->getLType(), lr->getLVal(), to, v->getRVal());
+
+    else if (u->isVar() && u->isVar()->lval)
         return new DLRValue(e1->type, u->getLVal(), to, v->getRVal());
 
     else if (gIR->topexp() && gIR->topexp()->e1 == this)