Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-tuple-02.cs
1 using System;
2
3 class TupleConversions
4 {
5         public static void Main ()
6         {
7                 object oarg = 4;
8                 (sbyte v1, long v2) t1 = (-1, 2);
9                 var t2 = (-1, 2);
10
11                 IComparable o = (x1: "a", x2: 1.ToString ());
12
13                 var arg = (x1: 1, x2: 1.ToString ());
14                 if (arg.x2 != "1")
15                         return;
16
17                 Foo ((x1: (oarg, 'v'), x2: 1.ToString ()));
18
19                 Test3 (ValueTuple.Create (1, "2"));
20
21                 (int v1, string v2) y = (1, null);
22
23                 (int v1, Action v2) y2 = (1, Main);
24                 (int v1, Action v2) y3 = (ValueTuple<int, Action>) (1, Main);
25
26                 (string v1, object v2) b = ("a", "b");
27
28                 (int v1, long v2)? x = null;
29         }
30
31         static void Foo<T> (T arg)
32         {               
33         }
34
35         static void Test3 ((long a, object b) arg)
36         {
37         }
38 }