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>2010-08-02 21:49:24 +0400
committerMarek Safar <marek.safar@gmail.com>2010-08-02 21:49:24 +0400
commit84d34dfff1aa97f5036e1c1447de6ac2f873b90f (patch)
tree41500a15781d7262c6513feb7bf045b8af61e672 /mcs/tests/test-790.cs
parent7427251ee0f3f8dcaed866123d90585b1b106b8b (diff)
Emit address load for compound struct references assignment. Fixed #620362
Diffstat (limited to 'mcs/tests/test-790.cs')
-rw-r--r--mcs/tests/test-790.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/mcs/tests/test-790.cs b/mcs/tests/test-790.cs
new file mode 100644
index 00000000000..b3daa3974ae
--- /dev/null
+++ b/mcs/tests/test-790.cs
@@ -0,0 +1,42 @@
+struct S
+{
+ public S (double d)
+ {
+ }
+}
+
+enum E
+{
+}
+
+struct Test
+{
+ static void Verify_1 (out Test a, out Test b)
+ {
+ a = b = new Test ();
+ }
+
+ static void Verify_2 (ref S a, ref S b)
+ {
+ a = b = new S (4.31);
+ }
+
+ static void Verify_3 (out E a, out E b)
+ {
+ a = b = new E ();
+ }
+
+ public static int Main ()
+ {
+ Test t1, t2;
+ Verify_1 (out t1, out t2);
+
+ S s1, s2;
+ Verify_2 (ref s1, ref s2);
+
+ E e1, e2;
+ Verify_3 (out e1, out e2);
+ return 0;
+ }
+}
+