[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / gtest-fixedbuffer-09.cs
blob146157644251665e20dde610cfb2cb5e7d397fe8
1 // Compiler options: -unsafe
3 using System;
4 using System.Runtime.CompilerServices;
6 unsafe struct Foo
8 public fixed long FieldName[32];
11 class Test
13 public static int Main ()
15 var t = typeof (Foo);
16 var f = t.GetField ("FieldName");
17 var fbas = f.GetCustomAttributes (typeof (FixedBufferAttribute), true)[0] as FixedBufferAttribute;
18 if (fbas.Length != 32)
19 return 1;
21 var fixed_type = typeof (Foo).GetNestedTypes ()[0];
22 if (fixed_type.StructLayoutAttribute.Pack != 8)
23 return 2;
25 if (fixed_type.StructLayoutAttribute.Size != 256)
26 return 3;
28 return 0;