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>2015-05-07 19:23:42 +0300
committerMarek Safar <marek.safar@gmail.com>2015-05-07 19:25:01 +0300
commit251ee4c04e955b8d21453dbf08315ea9914eff80 (patch)
tree871c8471a4fc279f4221b026b89f62b73f8ed359 /mcs/tests/test-923.cs
parent6447b00e9c249b5e8a5f05ec962a8dafb4c11c76 (diff)
[mcs] Flow analysis assignment from field expressions is now aware of special cased value types. Fixes #29276
Diffstat (limited to 'mcs/tests/test-923.cs')
-rw-r--r--mcs/tests/test-923.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/mcs/tests/test-923.cs b/mcs/tests/test-923.cs
new file mode 100644
index 00000000000..17710cd3dfb
--- /dev/null
+++ b/mcs/tests/test-923.cs
@@ -0,0 +1,37 @@
+using System;
+
+public struct Location
+{
+ public int x;
+ public int y;
+}
+
+public struct LocationWrapper
+{
+ public Location location;
+}
+
+class Program
+{
+ static void Main ()
+ {
+ }
+
+ public static void Test (out Location location)
+ {
+ location.x = 0;
+ location.y = location.x;
+ }
+
+ public static void Test (LocationWrapper member)
+ {
+ member.location.x = 0;
+ member.location.y = member.location.x;
+ }
+
+ public static void Test (out LocationWrapper member)
+ {
+ member.location.x = 0;
+ member.location.y = member.location.x;
+ }
+} \ No newline at end of file