Simplify mutator check
authorMarek Safar <marek.safar@gmail.com>
Mon, 26 Mar 2012 14:04:38 +0000 (15:04 +0100)
committerMarek Safar <marek.safar@gmail.com>
Tue, 27 Mar 2012 08:36:38 +0000 (09:36 +0100)
mcs/mcs/anonymous.cs

index 00fc3d998ff8cde5117f35adb6b36a5d1e5bdeaa..b419da06762f81cd77fb75cf8ca9e35e433efc07 100644 (file)
@@ -1375,7 +1375,6 @@ namespace Mono.CSharp {
                public abstract bool IsIterator { get; }
                public abstract AnonymousMethodStorey Storey { get; }
 
-
                //
                // The block that makes up the body for the anonymous method
                //
@@ -1678,9 +1677,7 @@ namespace Mono.CSharp {
                                // Mutate anonymous method instance type if we are in nested
                                // hoisted generic anonymous method storey
                                //
-                               if (ec.CurrentAnonymousMethod != null &&
-                                       ec.CurrentAnonymousMethod.Storey != null &&
-                                       ec.CurrentAnonymousMethod.Storey.Mutator != null) {
+                               if (ec.IsAnonymousStoreyMutateRequired) {
                                        t = storey.Mutator.Mutate (t);
                                }
 
@@ -1794,7 +1791,7 @@ namespace Mono.CSharp {
                        c.Block = new ToplevelBlock (parent.Module.Compiler, c.ParameterInfo, loc);
 
                        // 
-                       // Create fields and contructor body with field initialization
+                       // Create fields and constructor body with field initialization
                        //
                        bool error = false;
                        for (int i = 0; i < parameters.Count; ++i) {