diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-11-07 13:38:26 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-11-07 21:18:26 +0400 |
commit | 6de309a215ea218a03bc39ca691e17645f286900 (patch) | |
tree | 3261d3ba3c01c74bc704cfcd015c40e26c0d985a /mcs/tests/gtest-565.cs | |
parent | 8f96710cca52860c47144592b9c82ea2fc4198b7 (diff) |
Output type inference can be run on default parameters. Fixes #1892
Diffstat (limited to 'mcs/tests/gtest-565.cs')
-rw-r--r-- | mcs/tests/gtest-565.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/tests/gtest-565.cs b/mcs/tests/gtest-565.cs new file mode 100644 index 00000000000..9d45231e9e2 --- /dev/null +++ b/mcs/tests/gtest-565.cs @@ -0,0 +1,28 @@ +using System; + +public class B<T> +{ +} + +public class B2 : B<object> +{ +} + +public class C +{ + public static void Test<T, I> () where T : B<I>, I + { + Foo<T, I> (); + } + + public static void Foo<T, I> () where T : B<I>, I + { + } + + public static int Main () + { + Test<B2, object> (); + return 0; + } +} + |