Author: martin
Date: 2005-05-12 18:08:32 -0400 (Thu, 12 May 2005)
New Revision: 44477

Modified:
   trunk/mcs/mcs/ChangeLog
   trunk/mcs/mcs/statement.cs
Log:
**** Merged r44473 from GMCS ****


Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog     2005-05-12 21:56:24 UTC (rev 44476)
+++ trunk/mcs/mcs/ChangeLog     2005-05-12 22:08:32 UTC (rev 44477)
@@ -5,6 +5,12 @@
        (IsUnmanagedType): Avoid infloops by using
        'unmanaged_enclosing_types' to talk with recursive invocations.
 
+2005-05-13  Martin Baulig  <[EMAIL PROTECTED]>
+
+       * statement.cs (Block.Resolve): Make the `bool unresolved' flag an
+       instance variable, not a local.  Fix #74873.
+       (Block.ResolveUnreachable): Set it to true here.
+
 2005-05-11  Duncan Mak  <[EMAIL PROTECTED]>
 
        * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before

Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs  2005-05-12 21:56:24 UTC (rev 44476)
+++ trunk/mcs/mcs/statement.cs  2005-05-12 22:08:32 UTC (rev 44477)
@@ -1917,6 +1917,7 @@
                }
 
                bool unreachable_shown;
+               bool unreachable;
 
                public override bool Resolve (EmitContext ec)
                {
@@ -1936,8 +1937,6 @@
                        // from the beginning of the function.  The outer 
Resolve() that detected the unreachability is
                        // responsible for handling the situation.
                        //
-                       bool unreachable = false;
-
                        int statement_count = statements.Count;
                        for (int ix = 0; ix < statement_count; ix++){
                                Statement s = (Statement) statements [ix];
@@ -2021,6 +2020,8 @@
                        if (Implicit)
                                return Resolve (ec);
 
+                       unreachable = true;
+
                        ec.StartFlowBranching 
(FlowBranching.BranchingType.Block, loc);
                        bool ok = Resolve (ec);
                        ec.KillFlowBranching ();

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

Reply via email to