Don't set sequential type attribute for async containers
[mono.git] / mcs / mcs / async.cs
index 47ae75708707c7a4c2382dd7a420ad715df79453..6de09f01b1a9d83ff4a899f8cff922549a19e19d 100644 (file)
@@ -7,7 +7,7 @@
 // Dual licensed under the terms of the MIT X11 or GNU GPL
 //
 // Copyright 2011 Novell, Inc.
-// Copyright 2011 Xamarin Inc.
+// Copyright 2011-2012 Xamarin Inc.
 //
 
 using System;
@@ -16,8 +16,10 @@ using System.Linq;
 using System.Collections;
 
 #if STATIC
+using IKVM.Reflection;
 using IKVM.Reflection.Emit;
 #else
+using System.Reflection;
 using System.Reflection.Emit;
 #endif
 
@@ -486,6 +488,12 @@ namespace Mono.CSharp
                        }
                }
 
+               protected override TypeAttributes TypeAttr {
+                       get {
+                               return base.TypeAttr & ~TypeAttributes.SequentialLayout;
+                       }
+               }
+
                #endregion
 
                public Field AddAwaiter (TypeSpec type, Location loc)