[sdks] Fix README.md
[mono-project.git] / mcs / tests / test-123.cs
blobbd793f9f1a6bec4464774000c91c054c9650b6ad
1 class X {
3 static object get_non_null ()
5 return new X ();
8 static object get_null ()
10 return null;
13 public static int Main ()
15 int a = 5;
16 object o;
17 decimal d = 0M;
20 // compile time
22 if (!(get_non_null () is object))
23 return 1;
25 if (get_null () is object)
26 return 2;
28 if (!(a is object))
29 return 3;
32 // explicit reference
34 if (null is object)
35 return 4;
37 o = a;
38 if (!(o is int))
39 return 5;
41 if (d is int)
42 return 6;
44 object oi = 1;
45 if (!(oi is int))
46 return 7;
48 System.Console.WriteLine ("Is tests pass");
49 return 0;