diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-05-23 09:35:58 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-23 09:41:04 +0300 |
commit | a0fc3f4dcf571edc997f53066c09671650e96670 (patch) | |
tree | a6b0e207eafd02b0c6c4b094e2a54f4968e179df /mcs/tests/test-943.cs | |
parent | 872976e6c680c0547e4f9681300907a6cd510a23 (diff) |
[mcs] When setting struct empty layout consider compiler generated fields. Fixes #55604
Diffstat (limited to 'mcs/tests/test-943.cs')
-rw-r--r-- | mcs/tests/test-943.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mcs/tests/test-943.cs b/mcs/tests/test-943.cs new file mode 100644 index 00000000000..088e2f74742 --- /dev/null +++ b/mcs/tests/test-943.cs @@ -0,0 +1,19 @@ +using System; + +public struct MyStruct +{ + public int X { get; set; } +} + +class X +{ + public static int Main () + { + var s = typeof (MyStruct); + + if (s.StructLayoutAttribute.Size != 0) + return 1; + + return 0; + } +}
\ No newline at end of file |