diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-10-25 17:40:21 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-11-21 11:15:00 +0300 |
commit | 2c160ed9a7d88410b3dfb21d5c83ca8a04eac766 (patch) | |
tree | d708f8636a5634975843b5c7d6b9f2765df83fd5 /mcs/tests | |
parent | 73bd521c075b30bcbf349bdb7381d3b6b9fc3c69 (diff) |
[mcs] C# 7.2 ref struct feature
Diffstat (limited to 'mcs/tests')
-rw-r--r-- | mcs/tests/test-ref-07.cs | 30 | ||||
-rw-r--r-- | mcs/tests/ver-il-net_4_x.xml | 18 |
2 files changed, 48 insertions, 0 deletions
diff --git a/mcs/tests/test-ref-07.cs b/mcs/tests/test-ref-07.cs new file mode 100644 index 00000000000..4aa16579752 --- /dev/null +++ b/mcs/tests/test-ref-07.cs @@ -0,0 +1,30 @@ +// Compiler options: -langversion:latest + +public readonly partial ref struct Test +{ + public static void Main () + { + var m = new Test (); + m.Method (); + } + + Test Method () + { + return new Test (); + } +} + +ref struct Second +{ + Test field; +} + +public abstract class P +{ + public abstract Test Span { get; } +} + +public interface II +{ + Test Span { get; } +} diff --git a/mcs/tests/ver-il-net_4_x.xml b/mcs/tests/ver-il-net_4_x.xml index d4d18e5def7..93672cf9e9f 100644 --- a/mcs/tests/ver-il-net_4_x.xml +++ b/mcs/tests/ver-il-net_4_x.xml @@ -72906,6 +72906,24 @@ </method> </type> </test> + <test name="test-ref-07.cs"> + <type name="Test"> + <method name="Void Main()" attrs="150"> + <size>18</size> + </method> + <method name="Test Method()" attrs="129"> + <size>18</size> + </method> + </type> + <type name="P"> + <method name="Test get_Span()" attrs="3526"> + <size>0</size> + </method> + <method name="Void .ctor()" attrs="6276"> + <size>7</size> + </method> + </type> + </test> <test name="test-ref-08.cs"> <type name="ClassLibrary1.C"> <method name="Void MM()" attrs="129"> |