Merge pull request #5636 from BrzVlad/fix-xmm-scan
[mono.git] / mcs / tests / test-null-operator-16.cs
1 using System;
2
3 class X
4 {
5         Action<string> a;
6
7         public static void Main ()
8         {
9                 string x = null;
10                 string y = null;
11                 string[] z = null;
12
13                 x?.Contains (y?.ToLowerInvariant ());
14                 x?.Contains (y?.Length.ToString ());
15
16                 var res = x?[y?.Length ?? 0];
17
18                 var res2 = z?[x?.Length ?? 0];
19
20                 x?.Foo (y?.ToLowerInvariant ());
21
22                 X xx = null;
23                 xx?.a (y?.ToLowerInvariant ());
24         }
25 }
26
27 static class E
28 {
29         public static string Foo (this string arg, string value)
30         {
31                 return "";
32         }
33 }