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-05-23 16:28:41 +0300
committerMarek Safar <marek.safar@gmail.com>2018-05-24 10:09:38 +0300
commit178a49de7bfb5f53bfa4cf6914f75a8b0e886a4e (patch)
treeb5bb6a5ce60b2b991416fa47a5760a58818f0ecd /mcs/tests
parentb10647c0cf07f32a58ff97cb20b2bd95c2df8e89 (diff)
[mcs] Adds parser support for C# 7.2 readonly references
Diffstat (limited to 'mcs/tests')
-rw-r--r--mcs/tests/test-961.cs28
-rw-r--r--mcs/tests/ver-il-net_4_x.xml41
2 files changed, 69 insertions, 0 deletions
diff --git a/mcs/tests/test-961.cs b/mcs/tests/test-961.cs
new file mode 100644
index 00000000000..4456e19b3f4
--- /dev/null
+++ b/mcs/tests/test-961.cs
@@ -0,0 +1,28 @@
+// Compiler options: -langversion:latest
+
+using System;
+
+public static class B {
+ public static void Main ()
+ {
+ }
+
+ static void Foo (this in int src)
+ {
+ D p = (in int a) => {};
+ }
+
+}
+
+delegate void D (in int arg);
+
+class M
+{
+ int this[in int a] { set { } }
+ public static implicit operator string (in M m) => null;
+ public M (in int arg) { }
+
+ public void Test2 (in int arg)
+ {
+ }
+} \ 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 a2d9e1ec7ec..8917d57c3dd 100644
--- a/mcs/tests/ver-il-net_4_x.xml
+++ b/mcs/tests/ver-il-net_4_x.xml
@@ -52944,6 +52944,47 @@
</method>
</type>
</test>
+ <test name="test-961.cs">
+ <type name="B">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void Foo(Int32)" attrs="145">
+ <size>32</size>
+ </method>
+ <method name="Void &lt;Foo&gt;m__0(Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
+ <type name="D">
+ <method name="Void Invoke(Int32)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="System.IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void EndInvoke(System.IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="M">
+ <method name="Void set_Item(Int32, Int32)" attrs="2177">
+ <size>2</size>
+ </method>
+ <method name="System.String op_Implicit(M)" attrs="2198">
+ <size>9</size>
+ </method>
+ <method name="Void Test2(Int32)" attrs="134">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>8</size>
+ </method>
+ </type>
+ </test>
<test name="test-97.cs">
<type name="X">
<method name="Int32 Main()" attrs="150">