More generics tests.
authorMartin Baulig <martin@novell.com>
Fri, 17 Oct 2003 03:41:09 +0000 (03:41 -0000)
committerMartin Baulig <martin@novell.com>
Fri, 17 Oct 2003 03:41:09 +0000 (03:41 -0000)
svn path=/trunk/mcs/; revision=19118

mcs/tests/gen-16.cs [new file with mode: 0644]
mcs/tests/gen-17-dll.cs [new file with mode: 0644]
mcs/tests/gen-17-exe.cs [new file with mode: 0644]
mcs/tests/gen-18.cs [new file with mode: 0644]

diff --git a/mcs/tests/gen-16.cs b/mcs/tests/gen-16.cs
new file mode 100644 (file)
index 0000000..8cf1f97
--- /dev/null
@@ -0,0 +1,14 @@
+class Stack<S>
+{
+       public static void Hello<T> (S s, T t)
+       { }
+}
+
+class X
+{
+       Stack<int> stack;
+
+       static void Main ()
+       {
+       }
+}
diff --git a/mcs/tests/gen-17-dll.cs b/mcs/tests/gen-17-dll.cs
new file mode 100644 (file)
index 0000000..f7d6d5a
--- /dev/null
@@ -0,0 +1,8 @@
+public class Stack
+{
+       public Stack ()
+       { }
+
+       public void Hello<T> (T t)
+       { }
+}
diff --git a/mcs/tests/gen-17-exe.cs b/mcs/tests/gen-17-exe.cs
new file mode 100644 (file)
index 0000000..2dc4bcb
--- /dev/null
@@ -0,0 +1,13 @@
+public class X
+{
+       public static void Foo (Stack stack)
+       {
+               stack.Hello<string> ("Hello World");
+       }
+
+       static void Main ()
+       {
+               Stack stack = new Stack ();
+               Foo (stack);
+       }
+}
diff --git a/mcs/tests/gen-18.cs b/mcs/tests/gen-18.cs
new file mode 100644 (file)
index 0000000..92f38ce
--- /dev/null
@@ -0,0 +1,22 @@
+public class Stack
+{
+       public Stack ()
+       { }
+
+       public void Hello<T> (T t)
+       { }
+}
+
+public class X
+{
+       public static void Foo (Stack stack)
+       {
+               stack.Hello<string> ("Hello World");
+       }
+
+       static void Main ()
+       {
+               Stack stack = new Stack ();
+               Foo (stack);
+       }
+}