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:
authorMartin Baulig <martin@novell.com>2006-03-07 03:39:56 +0300
committerMartin Baulig <martin@novell.com>2006-03-07 03:39:56 +0300
commita02b38cf9b3c791629d8960d89bde8b2abbc3f6c (patch)
treeff74f93550cbc4483e97c5de924363daabb9fa92 /mcs/tests/gtest-251.cs
parent939df12d88ce184161ea356d8df5efd748be5d79 (diff)
2006-03-07 Martin Baulig <martin@ximian.com>
* generic.cs (TypeManager.InferType): Allow infering `IEnumerable<T>' with an array of T; see gtest-251.cs. svn path=/trunk/mcs/; revision=57639
Diffstat (limited to 'mcs/tests/gtest-251.cs')
-rw-r--r--mcs/tests/gtest-251.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/mcs/tests/gtest-251.cs b/mcs/tests/gtest-251.cs
new file mode 100644
index 00000000000..be977692803
--- /dev/null
+++ b/mcs/tests/gtest-251.cs
@@ -0,0 +1,22 @@
+using System;
+using SCG = System.Collections.Generic;
+
+public interface ISorted<S>
+{
+ void AddSorted<T> (SCG.IEnumerable<T> items)
+ where T : S;
+}
+
+public class SortedIndexedTester<T>
+{
+ public void Test (ISorted<int> sorted)
+ {
+ sorted.AddSorted (new int[] { 31, 62, 63, 93 });
+ }
+}
+
+class X
+{
+ static void Main ()
+ { }
+}