Author: martin
Date: 2005-05-10 19:11:39 -0400 (Tue, 10 May 2005)
New Revision: 44365

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/ecore.cs
   trunk/mcs/gmcs/statement.cs
Log:
**** Merged r44250 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-05-10 23:10:13 UTC (rev 44364)
+++ trunk/mcs/gmcs/ChangeLog    2005-05-10 23:11:39 UTC (rev 44365)
@@ -52,6 +52,15 @@
        (Attributable.IsClsComplianceRequired): Fix typo in the method name.
        (AttributeTester.AnalyzeTypeCompliance): Add generics support.
 
+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/gmcs/ecore.cs
===================================================================
--- trunk/mcs/gmcs/ecore.cs     2005-05-10 23:10:13 UTC (rev 44364)
+++ trunk/mcs/gmcs/ecore.cs     2005-05-10 23:11:39 UTC (rev 44365)
@@ -1974,6 +1974,7 @@
        public class SimpleName : Expression {
                public string Name;
                public readonly TypeArguments Arguments;
+               bool in_transit;
 
                public SimpleName (string name, Location l)
                {
@@ -2145,6 +2146,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/gmcs/statement.cs
===================================================================
--- trunk/mcs/gmcs/statement.cs 2005-05-10 23:10:13 UTC (rev 44364)
+++ trunk/mcs/gmcs/statement.cs 2005-05-10 23:11:39 UTC (rev 44365)
@@ -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