diff dmd/CondExp.d @ 130:60bb0fe4563e

dmdfe 2.037 first main iteration
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Thu, 09 Sep 2010 22:51:44 +0100
parents 010eb8f0e18d
children af1bebfd96a4
line wrap: on
line diff
--- a/dmd/CondExp.d	Sun Sep 05 15:32:22 2010 +0400
+++ b/dmd/CondExp.d	Thu Sep 09 22:51:44 2010 +0100
@@ -210,8 +210,10 @@
 
     override Expression modifiableLvalue(Scope sc, Expression e)
 	{
-		error("conditional expression %s is not a modifiable lvalue", toChars());
-		return this;
+        //error("conditional expression %s is not a modifiable lvalue", toChars());
+        e1 = e1.modifiableLvalue(sc, e1);
+        e2 = e2.modifiableLvalue(sc, e1);
+        return toLvalue(sc, this);
 	}
 
     override Expression checkToBoolean()