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-09-13 14:56:19 +0400
committerMarek Safar <marek.safar@gmail.com>2011-09-13 14:57:48 +0400
commitd4d21db33fd8ad10d9260c8b2b5d817ecd46cc94 (patch)
tree2d0e6f497d1c6fa5b9718ae41f5e2034b4745f1d /mcs/tests/test-828.cs
parent3ca49569bc3067fd6b3f8f0f49eefc695eb74afe (diff)
Check whether parent struct field is assigned when assigning to child field. Fixes #685916
Diffstat (limited to 'mcs/tests/test-828.cs')
-rw-r--r--mcs/tests/test-828.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/mcs/tests/test-828.cs b/mcs/tests/test-828.cs
new file mode 100644
index 00000000000..86b6e34e510
--- /dev/null
+++ b/mcs/tests/test-828.cs
@@ -0,0 +1,26 @@
+// Compiler options: -warnaserror
+
+public class C
+{
+ public int v;
+}
+
+public struct S2
+{
+ public C c;
+ public int v;
+}
+
+public struct S
+{
+ public S2 s2;
+}
+
+public class Test
+{
+ static void Main ()
+ {
+ S s;
+ s.s2.v = 9;
+ }
+} \ No newline at end of file