Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dtest-055.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b948fcd9a14de7f259e8d39f010e620d2efb28fa (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
26
27
28
using System;

struct S<T>
{
}

abstract class B<T1, T2>
{
	public abstract void Foo<U> (U x) where U : T1, T2;
}

class C : B<S<object>, S<dynamic>>
{
	public override void Foo<U> (U x)
	{
	}

	public static int Main ()
	{
		var m = typeof (C).GetMethod ("Foo");
		var ta = m.GetGenericArguments ()[0].GetGenericParameterConstraints ();
		if (ta.Length != 1)
			return 1;
		
		Console.WriteLine ("ok");
		return 0;
	}
}