Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / test-default-01.cs
blob28aff830cd9789b60745b607df3e8043c142b5a5
1 // Compiler options: -langversion:latest
3 static class X
5 const int c1 = default;
6 const int c2 = default (int);
8 public static void Main ()
10 int a = default;
11 var b = (int) default;
12 const int c = default;
13 var d = new[] { 1, default };
14 dynamic e = default;
15 int f = checked (default);
16 (int a, int b) g = (1, default);
17 var h = 1 != default;
18 var i = default == M4 ();
21 static int M1 ()
23 return default;
26 static void M2 ()
28 try {
29 throw new System.Exception ();
30 } catch (System.Exception) when (default) {
33 if (default) {
37 static void M3 (int x = default)
41 static System.Func<int> M4 ()
43 return () => default;
46 static void Foo (II a = default (II), II b = default, II c = (II) null)
51 enum E
53 A = default,
54 B = default + 1
59 interface II