Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / test-null-operator-010.cs
blob2d724034329389fbc7593772c58a395b2dce66d4
1 using System;
3 class Test
5 static void Main ()
7 Test_1 ("");
8 Test_1<object> (null);
10 Test_2<object> (null);
11 Test_2 ("z");
12 Test_2 (0);
13 Test_2 ((long?) -8);
15 Test_3 (new int[1]);
16 Test_3 (new int[] { 5 });
19 static void Test_1<T> (T x) where T : class
21 x?.Call ();
24 static void Test_2<T> (T x)
26 x?.Call ();
29 static void Test_3<T> (T[] x)
31 x[0]?.Call ();
35 static class Ext
37 public static void Call<T> (this T t)
39 Console.WriteLine (typeof (T));