Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-123.cs
1 class X {
2
3         static object get_non_null ()
4         {
5                 return new X ();
6         }
7
8         static object get_null ()
9         {
10                 return null;
11         }
12         
13         public static int Main ()
14         {
15                 int a = 5;
16                 object o;
17                 decimal d = 0M;
18                 
19                 //
20                 // compile time
21                 //
22                 if (!(get_non_null () is object))
23                         return 1;
24
25                 if (get_null () is object)
26                         return 2;
27
28                 if (!(a is object))
29                         return 3;
30
31                 //
32                 // explicit reference
33                 //
34                 if (null is object)
35                         return 4;
36
37                 o = a;
38                 if (!(o is int))
39                         return 5;
40
41                 if (d is int)
42                         return 6;
43                         
44                 object oi = 1;
45                 if (!(oi is int))
46                         return 7;
47
48                 System.Console.WriteLine ("Is tests pass");
49                 return 0;
50         }
51 }