**** Merged r44473 from GMCS ****
authorMartin Baulig <martin@novell.com>
Thu, 12 May 2005 22:08:32 +0000 (22:08 -0000)
committerMartin Baulig <martin@novell.com>
Thu, 12 May 2005 22:08:32 +0000 (22:08 -0000)
svn path=/trunk/mcs/; revision=44477

mcs/mcs/ChangeLog
mcs/mcs/statement.cs

index c4b35269dd8003c18f0c2164823a882012107b3f..9f95178af98b4a1b9ef828b5dc01f64e497298cc 100644 (file)
@@ -5,6 +5,12 @@
        (IsUnmanagedType): Avoid infloops by using
        'unmanaged_enclosing_types' to talk with recursive invocations.
 
+2005-05-13  Martin Baulig  <martin@ximian.com>
+
+       * 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  <duncan@novell.com>
 
        * cs-tokenizer.cs (get_cmd_arg): Check that 'c' is not -1 before
index 6a7c6811104466071bc12ec3c0615100edec8b82..c09a0a74b4cdda5e746c2317c9593b052a7fff47 100644 (file)
@@ -1917,6 +1917,7 @@ namespace Mono.CSharp {
                }
 
                bool unreachable_shown;
+               bool unreachable;
 
                public override bool Resolve (EmitContext ec)
                {
@@ -1936,8 +1937,6 @@ namespace Mono.CSharp {
                        // 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 @@ namespace Mono.CSharp {
                        if (Implicit)
                                return Resolve (ec);
 
+                       unreachable = true;
+
                        ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
                        bool ok = Resolve (ec);
                        ec.KillFlowBranching ();