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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2011-10-31 12:39:55 +0400
committerMarek Safar <marek.safar@gmail.com>2011-11-02 15:09:47 +0400
commitb9b7f7846c45e10a8b938afa3a52d409de276d1b (patch)
tree0f6f497fef94efe468a0d7d89dc89fd862cdbae1 /mcs/tests/dtest-055.cs
parent1b1b22be7e91b8ecfd001b9e6a61421fd82d46a7 (diff)
Remove duplicate inherited constraint types
Diffstat (limited to 'mcs/tests/dtest-055.cs')
-rw-r--r--mcs/tests/dtest-055.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/tests/dtest-055.cs b/mcs/tests/dtest-055.cs
new file mode 100644
index 00000000000..b948fcd9a14
--- /dev/null
+++ b/mcs/tests/dtest-055.cs
@@ -0,0 +1,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;
+ }
+} \ No newline at end of file