[ilasm] Don't break arguments compatiblity
[mono-project.git] / mcs / tests / test-null-operator-03.cs
blob2dec27a104c8a1b834bfbc6ecc18b98cca44c74b
1 using System;
3 class C
5 int field;
7 int Test1 ()
9 var x = this?.field;
10 if (x == null)
11 return 1;
13 var x2 = "abc"?.GetHashCode();
14 if (x2 == null)
15 return 2;
17 return 0;
20 static int Main ()
22 var c = new C ();
23 c.Test1 ();
25 const C c2 = null;
26 var res = c2?.field;
27 if (res != null)
28 return 1;
30 Console.WriteLine ("ok");
31 return 0;