summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-378.cs
blob: c0245ef67945b3cb1d8ba33cae56f12e67c034bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Test {
	static object Foo (int? i)
	{
		return (object)i;
	}
	
	static object FooG<T> (T? i) where T : struct
	{
		return (object)i;
	}
	
	public static int Main ()
	{
		object o = Foo (null);
		if (o != null)
			return 1;

		o = FooG<bool> (null);
		if (o != null)
			return 2;
		
		System.Console.WriteLine ("OK");
		return 0;
	}
}