Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2013-11-27 17:10:35 +0400
committerMarek Safar <marek.safar@gmail.com>2013-11-27 17:12:46 +0400
commit56ccb68415fb688e0fa4a7a770e8f2ab7e507fb4 (patch)
tree81f3553ad929e202ae70e4f1bd31b26a245d1759 /mcs/tests/test-879.cs
parent7249051374ea0a0d437cb4c6d617ec0665e5a1ae (diff)
[mcs] Emit this initializer for structs. Fixes #16430
Diffstat (limited to 'mcs/tests/test-879.cs')
-rw-r--r--mcs/tests/test-879.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/tests/test-879.cs b/mcs/tests/test-879.cs
new file mode 100644
index 00000000000..4d6aa3396bb
--- /dev/null
+++ b/mcs/tests/test-879.cs
@@ -0,0 +1,28 @@
+struct AStruct
+{
+ public object foo;
+
+ public AStruct (int i)
+ : this ()
+ {
+ }
+}
+
+public class Tests
+{
+ public static int Main ()
+ {
+ for (int i = 0; i < 100; ++i) {
+ AStruct a;
+
+ a = new AStruct (5);
+ if (a.foo != null)
+ return 1;
+
+ a.foo = i + 1;
+ }
+
+ System.Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file