Author: marek
Date: 2005-05-09 04:15:47 -0400 (Mon, 09 May 2005)
New Revision: 44250

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/ecore.cs
   trunk/mcs/mcs/statement.cs
Log:
2005-05-09  Marek Safar  <[EMAIL PROTECTED]>

        Fix #73105.
        
        * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
        recursive declaration.
        
        * statement.cs (Block.ResolveMeta): Report any error in resolving.

Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-05-09 08:06:12 UTC (rev 44249)
+++ trunk/mcs/mcs/ChangeLog     2005-05-09 08:15:47 UTC (rev 44250)
@@ -1,3 +1,12 @@
+2005-05-09  Marek Safar  <[EMAIL PROTECTED]>
+
+       Fix #73105.
+       
+       * ecore.cs (SimpleName.SimpleNameResolve): Add in_transit to catch
+       recursive declaration.
+       
+       * statement.cs (Block.ResolveMeta): Report any error in resolving.
+       
 2005-05-06  Marek Safar  <[EMAIL PROTECTED]>
 
        * cfold (DoConstantNumericPromotions): Don't try to convert 0 enum.

Modified: trunk/mcs/mcs/ecore.cs
===================================================================
--- trunk/mcs/mcs/ecore.cs      2005-05-09 08:06:12 UTC (rev 44249)
+++ trunk/mcs/mcs/ecore.cs      2005-05-09 08:15:47 UTC (rev 44250)
@@ -1932,6 +1932,7 @@
        /// </summary>
        public class SimpleName : Expression {
                public string Name;
+               bool in_transit;
 
                public SimpleName (string name, Location l)
                {
@@ -1988,6 +1989,10 @@
 
                Expression SimpleNameResolve (EmitContext ec, Expression 
right_side, bool intermediate)
                {
+                       if (in_transit)
+                               return null;
+                       in_transit = true;
+
                        Expression e = DoSimpleNameResolve (ec, right_side, 
intermediate);
                        if (e == null)
                                return null;

Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs  2005-05-09 08:06:12 UTC (rev 44249)
+++ trunk/mcs/mcs/statement.cs  2005-05-09 08:15:47 UTC (rev 44250)
@@ -1826,14 +1826,11 @@
 
                                        ec.CurrentBlock = this;
                                        Expression e = cv.Resolve (ec);
-                                       if (e == null)
-                                               continue;
 
                                        Constant ce = e as Constant;
                                        if (ce == null){
                                                Report.Error (133, vi.Location,
-                                                             "The expression 
being assigned to `" +
-                                                             name + "' must be 
constant (" + e + ")");
+                                                             "The expression 
being assigned to '{0}' must be constant", name);
                                                continue;
                                        }
 

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

Reply via email to