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
path: root/mcs/tests
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2018-04-05 14:55:22 +0300
committerMarek Safar <marek.safar@gmail.com>2018-04-05 18:56:02 +0300
commit190e32ee8c4627504271e9c5362af945efaeff64 (patch)
treeabfc3747562775e62531d1478b505213df0b55d1 /mcs/tests
parent8e0a12189a84a7bd0007946ca60796d23e773e91 (diff)
[mcs] Implements C# 7.2 conditional ref expression
Diffstat (limited to 'mcs/tests')
-rw-r--r--mcs/tests/test-ref-11.cs13
-rw-r--r--mcs/tests/ver-il-net_4_x.xml10
2 files changed, 23 insertions, 0 deletions
diff --git a/mcs/tests/test-ref-11.cs b/mcs/tests/test-ref-11.cs
new file mode 100644
index 00000000000..8d392a77d07
--- /dev/null
+++ b/mcs/tests/test-ref-11.cs
@@ -0,0 +1,13 @@
+class Program
+{
+ static int x;
+ static int y;
+
+ public static int Main ()
+ {
+ bool b = false;
+ ref int targetBucket = ref b ? ref x : ref y;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml
index 181a87a2e5f..d839d5978e9 100644
--- a/mcs/tests/ver-il-net_4_x.xml
+++ b/mcs/tests/ver-il-net_4_x.xml
@@ -73301,6 +73301,16 @@
</method>
</type>
</test>
+ <test name="test-ref-11.cs">
+ <type name="Program">
+ <method name="Int32 Main()" attrs="150">
+ <size>34</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-static-using-01.cs">
<type name="A.B.X">
<method name="Int32 Test()" attrs="150">