// 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;
using System.Collections;
#if STATIC
+using IKVM.Reflection;
using IKVM.Reflection.Emit;
#else
+using System.Reflection;
using System.Reflection.Emit;
#endif
}
}
+ protected override TypeAttributes TypeAttr {
+ get {
+ return base.TypeAttr & ~TypeAttributes.SequentialLayout;
+ }
+ }
+
#endregion
public Field AddAwaiter (TypeSpec type, Location loc)
//
// Sets .size to 1 for structs with no instance fields
//
- int type_size = Kind == MemberKind.Struct && first_nonstatic_field == null ? 1 : 0;
+ int type_size = Kind == MemberKind.Struct && first_nonstatic_field == null && !(this is StateMachine) ? 1 : 0;
var parent_def = Parent as TypeDefinition;
if (parent_def == null) {