summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-071.cs
blob: 8352a2b2862c60950b581f89d3b48930c6eebd77 (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
using System;

class Foo<T>
{
	public T Test<U> (U u)
		where U : T
	{
		return u;
	}
}

class X
{
	public static void Main ()
	{
		Foo<X> foo = new Foo<X> ();

		Y y = new Y ();
		X x = foo.Test<Y> (y);
	}
}

class Y : X
{
}