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>2011-10-04 12:33:40 +0400
committerMarek Safar <marek.safar@gmail.com>2011-10-04 12:34:31 +0400
commitf12b1658129ec997be4dd221578f161c3129005d (patch)
tree9173f67e85dcee3c075d9fefaac211ea056a0363 /mcs/tests/test-829.cs
parent729b27e7e6826a3f42507b0dff1d5d630ba3221d (diff)
Fix recent regression caused by changes to assignment of struct fields
Diffstat (limited to 'mcs/tests/test-829.cs')
-rw-r--r--mcs/tests/test-829.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/mcs/tests/test-829.cs b/mcs/tests/test-829.cs
new file mode 100644
index 00000000000..6a7e2c8a9c5
--- /dev/null
+++ b/mcs/tests/test-829.cs
@@ -0,0 +1,34 @@
+using System;
+
+struct S2
+{
+ public float f1;
+}
+
+struct S
+{
+ public S2 s2;
+ public float F;
+}
+
+class C
+{
+ static void Test (bool b, out S s)
+ {
+ if (b) {
+ s.s2 = new S2 ();
+ s.F = 1.0f;
+ } else {
+ s.s2.f1 = 2.1f;
+ s.F = 1.0f;
+ }
+ }
+
+ public static int Main ()
+ {
+ S s;
+ Test (true, out s);
+ Test (false, out s);
+ return 0;
+ }
+}