diff options
author | Marek Safar <marek.safar@gmail.com> | 2018-01-22 16:59:55 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-01-22 21:11:27 +0300 |
commit | 51e1e5af325baa566bd6b65dd045e461eb1cef7c (patch) | |
tree | b1135eb60b5e72698c51d0f60cdbb06599f533f3 /mcs/tests | |
parent | b519d42c15e08158ad48824bab4922797a766704 (diff) |
[mcs] Implements C# 7 tuples implicit deconstruction
Diffstat (limited to 'mcs/tests')
-rw-r--r-- | mcs/tests/test-tuple-09.cs | 19 | ||||
-rw-r--r-- | mcs/tests/ver-il-net_4_x.xml | 26 |
2 files changed, 32 insertions, 13 deletions
diff --git a/mcs/tests/test-tuple-09.cs b/mcs/tests/test-tuple-09.cs new file mode 100644 index 00000000000..3f15cae6cf1 --- /dev/null +++ b/mcs/tests/test-tuple-09.cs @@ -0,0 +1,19 @@ +using System; + +class TupleDeconstructionDeclaration +{ + public static int Main () + { + (string s, long l) = GetValues (); + (var vs, var vl) = GetValues (); + (object o, var vl2) = GetValues (); + (string ds, _) = GetValues (); + + return 0; + } + + static (string, long) GetValues () + { + return ("a", 3); + } +}
\ 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 aa3578da455..dbb2e5869e9 100644 --- a/mcs/tests/ver-il-net_4_x.xml +++ b/mcs/tests/ver-il-net_4_x.xml @@ -68710,19 +68710,6 @@ </method> </type> </test> - <test name="test-default-03.cs"> - <type name="X"> - <method name="Int32 Main()" attrs="150"> - <size>25</size> - </method> - <method name="Byte[] Test(S`1[System.Byte])" attrs="145"> - <size>10</size> - </method> - <method name="Void .ctor()" attrs="6278"> - <size>7</size> - </method> - </type> - </test> <test name="test-dictinit-01.cs"> <type name="Program"> <method name="Int32 Main()" attrs="145"> @@ -73776,6 +73763,19 @@ </method> </type> </test> + <test name="test-tuple-09.cs"> + <type name="TupleDeconstructionDeclaration"> + <method name="Int32 Main()" attrs="150"> + <size>99</size> + </method> + <method name="System.ValueTuple`2[System.String,System.Int64] GetValues()" attrs="145"> + <size>21</size> + </method> + <method name="Void .ctor()" attrs="6278"> + <size>7</size> + </method> + </type> + </test> <test name="test-var-01.cs"> <type name="Test"> <method name="Int32 Main()" attrs="150"> |