diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-12-11 19:01:39 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-12-13 01:12:15 +0300 |
commit | da807f6f900ec774a4d94a1a9317916c7ef2a905 (patch) | |
tree | 7dbb64f9ece4b0b926dcb3097c3c021da82feb19 /mcs/tests | |
parent | 2d43cf694f95fdb44be07d6a34e28691b477de29 (diff) |
[mcs] Propagate flow analysis for tuple deconstruct
Diffstat (limited to 'mcs/tests')
-rw-r--r-- | mcs/tests/test-tuple-08.cs | 24 | ||||
-rw-r--r-- | mcs/tests/ver-il-net_4_x.xml | 24 |
2 files changed, 48 insertions, 0 deletions
diff --git a/mcs/tests/test-tuple-08.cs b/mcs/tests/test-tuple-08.cs new file mode 100644 index 00000000000..fd3375b4df6 --- /dev/null +++ b/mcs/tests/test-tuple-08.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +class X +{ + public static void Main () + { + var x = new X (); + x.Test ().Wait (); + } + + int a, b; + + async Task Test () + { + (a, b) = await Waiting (); + } + + Task<(int, int)> Waiting () + { + return Task.FromResult ((1, 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 4858d31c374..3d4d271f3db 100644 --- a/mcs/tests/ver-il-net_4_x.xml +++ b/mcs/tests/ver-il-net_4_x.xml @@ -73499,6 +73499,30 @@ </method> </type> </test> + <test name="test-tuple-08.cs"> + <type name="X"> + <method name="Void Main()" attrs="150"> + <size>19</size> + </method> + <method name="System.Threading.Tasks.Task Test()" attrs="129"> + <size>41</size> + </method> + <method name="System.Threading.Tasks.Task`1[System.ValueTuple`2[System.Int32,System.Int32]] Waiting()" attrs="129"> + <size>21</size> + </method> + <method name="Void .ctor()" attrs="6278"> + <size>7</size> + </method> + </type> + <type name="X+<Test>c__async0"> + <method name="Void MoveNext()" attrs="486"> + <size>212</size> + </method> + <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486"> + <size>13</size> + </method> + </type> + </test> <test name="test-var-01.cs"> <type name="Test"> <method name="Int32 Main()" attrs="150"> |