Author: raja
Date: 2005-03-25 13:28:59 -0500 (Fri, 25 Mar 2005)
New Revision: 42257

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/assign.cs
Log:
Fix #73038.
* assign.cs (Assign.DoResolve): When the RHS of an assignment
fails to resolve, ensure that the LHS is still resolved as an
lvalue.


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-03-25 18:13:00 UTC (rev 42256)
+++ trunk/mcs/mcs/ChangeLog     2005-03-25 18:28:59 UTC (rev 42257)
@@ -1,3 +1,10 @@
+2005-03-26  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       Fix #73038.
+       * assign.cs (Assign.DoResolve): When the RHS of an assignment
+       fails to resolve, ensure that the LHS is still resolved as an
+       lvalue.
+
 2005-03-25  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * enum.cs (Enum.DefineType): Set ec.InEnumContext and

Modified: trunk/mcs/mcs/assign.cs
===================================================================
--- trunk/mcs/mcs/assign.cs     2005-03-25 18:13:00 UTC (rev 42256)
+++ trunk/mcs/mcs/assign.cs     2005-03-25 18:28:59 UTC (rev 42257)
@@ -313,8 +313,11 @@
                                source = embedded = ((Assign) 
source).GetEmbeddedAssign (loc);
 
                        real_source = source = source.Resolve (ec);
-                       if (source == null)
+                       if (source == null) {
+                               // Ensure that we don't propagate the error as 
spurious "uninitialized variable" errors.
+                               target = target.ResolveLValue (ec, 
EmptyExpression.Null);
                                return null;
+                       }
 
                        //
                        // This is used in an embedded assignment.

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to