2008-08-31 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / tests / gtest-400.cs
blobaf7b38b9829cf6c616c9bb5d19bf864aa3c3ae50
1 using System;
3 class Gen<T> where T : class
5 public static bool Foo (T t)
7 return t is Program;
11 class Program
13 static bool Foo<T> ()
15 object o = 1;
16 return o is T;
19 static int Main ()
21 if (Foo<bool> ())
22 return 1;
24 if (!Foo<int> ())
25 return 2;
27 if (Gen<object>.Foo (null))
28 return 3;
30 if (!Gen<Program>.Foo (new Program ()))
31 return 4;
33 Console.WriteLine ("ok");
34 return 0;