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-21 20:59:48 +0300
committerMartin Baulig <martin@novell.com>2006-03-21 20:59:48 +0300
commitdd406e5d653b9f4286be33312008b112aedb5bbe (patch)
treebbd48243b2b53febb8fb425e269cb9380daaa266 /mcs/tests/gtest-261.cs
parentb0b741085bfafa2ced9656d6c9cbee75a376662c (diff)
2006-03-21 Martin Baulig <martin@ximian.com>
Fix #77583. * generic.cs (TypeManager.InferType): If `pt' is a generic parameter, don't check whether `pt == at'. svn path=/trunk/mcs/; revision=58233
Diffstat (limited to 'mcs/tests/gtest-261.cs')
-rwxr-xr-xmcs/tests/gtest-261.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/mcs/tests/gtest-261.cs b/mcs/tests/gtest-261.cs
new file mode 100755
index 00000000000..43ba6b8f254
--- /dev/null
+++ b/mcs/tests/gtest-261.cs
@@ -0,0 +1,42 @@
+using System;
+
+class Cons<T,U>
+{
+ public T car;
+ public U cdr;
+
+ public Cons (T x, U y)
+ {
+ car = x; cdr = y;
+ }
+
+ public override String ToString ()
+ {
+ return "(" + car + '.' + cdr + ')';
+ }
+}
+
+class List<A> : Cons<A, List<A>>
+{
+ public List (A value)
+ : base(value, null)
+ { }
+
+ public List (A value, List<A> next)
+ : base(value, next)
+ { }
+
+ public void zip<B> (List<B> other)
+ {
+ cdr.zip (other.cdr);
+ }
+}
+
+abstract class Test
+{
+ public static void Main (String[] args)
+ {
+ List<int> list = new List<Int32> (3);
+ Console.WriteLine (list);
+ }
+}