2004-06-13 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Sun, 13 Jun 2004 02:15:14 +0000 (02:15 -0000)
committerMartin Baulig <martin@novell.com>
Sun, 13 Jun 2004 02:15:14 +0000 (02:15 -0000)
* gen-57.cs: New test.

svn path=/trunk/mcs/; revision=29432

mcs/tests/ChangeLog
mcs/tests/gen-57.cs [new file with mode: 0644]

index 6f26de77833d44baf3e10ad6235dce8275841a2c..939050da494175ee9b68ef98b2a7674a7edc2833 100755 (executable)
@@ -1,3 +1,7 @@
+2004-06-13  Martin Baulig  <martin@ximian.com>
+
+       * gen-57.cs: New test.
+
 2004-06-11  Martin Baulig  <martin@ximian.com>
 
        * gen-56.cs: New test from #58307.
diff --git a/mcs/tests/gen-57.cs b/mcs/tests/gen-57.cs
new file mode 100644 (file)
index 0000000..e3ba73b
--- /dev/null
@@ -0,0 +1,37 @@
+using System;
+
+interface IHello<T>
+{
+       void Print (T t);
+}
+
+interface Foo
+{
+       IHello<U> Test<U> ();
+}
+
+class Hello<T> : IHello<T>, Foo
+{
+       public void Print (T t)
+       {
+               Console.WriteLine ("Hello: {0}", t);
+       }
+
+       public IHello<U> Test<U> ()
+       {
+               return new Hello<U> ();
+       }
+}
+
+class X
+{
+       static void Main ()
+       {
+               Hello<int> hello = new Hello<int> ();
+               hello.Print (5);
+               hello.Test<float> ().Print (3.14F);
+
+               IHello<string> foo = hello.Test<string> ();
+               foo.Print ("World");
+       }
+}