* gen-3.cs, gen-4.cs, gen-5.cs, gen-6.cs, gen-7.cs, gen-8.cs: New
generics tests.
svn path=/trunk/mcs/; revision=18137
+2003-09-16 Martin Baulig <martin@ximian.com>
+
+ * gen-3.cs, gen-4.cs, gen-5.cs, gen-6.cs, gen-7.cs, gen-8.cs: New
+ generics tests.
+
2003-09-02 Ravi Pratap <ravi@ximian.com>
* test-102.cs: Improve test.
Tests the correct computation of compound operators in the context of a pointer
dereference on the left side.
+gen-1.cs:
+---------
+
+Simple constructed type.
+
+gen-2.cs:
+---------
+
+Type parameter as field.
+
+gen-3.cs:
+---------
+
+Field of constructed type.
+
+gen-4.cs:
+---------
+
+Method argument of constructed type.
+
+gen-5.cs:
+---------
+
+Local variable of constructed type.
+
+gen-6.cs:
+---------
+
+More complex example.
+
+gen-7.cs:
+---------
+
+Constructed type deriving from a class type.
+
+gen-8.cs:
+---------
+
+`where' clauses.
+
--- /dev/null
+class Stack<T> {
+}
+
+class Test {
+}
+
+class T {
+ Stack<Test> a;
+
+ static void Main()
+ {
+ }
+}
--- /dev/null
+class Stack<T> {
+}
+
+class Test {
+}
+
+class T {
+ public void Foo (Stack<Test> a)
+ { }
+
+ static void Main()
+ {
+ }
+}
--- /dev/null
+class Stack<T> {
+}
+
+class Test {
+}
+
+class T {
+ static void Main()
+ {
+ Stack<Test> a;
+ }
+}
--- /dev/null
+class Stack<T>
+{
+ int size;
+ T[] data;
+
+ public Stack ()
+ {
+ data = new T [200];
+ }
+
+ public void Push (T item)
+ {
+ data [size++] = item;
+ }
+
+ public T Pop ()
+ {
+ return data [--size];
+ }
+
+ public void Hello (T t)
+ {
+ System.Console.WriteLine ("Hello: {0}", t);
+ }
+}
+
+class Test
+{
+ static void Main ()
+ {
+ }
+}
--- /dev/null
+class Stack<T> : X
+{
+}
+
+class Test
+{
+}
+
+class X
+{
+ static void Main()
+ {
+ }
+}
--- /dev/null
+interface I
+{
+ void Hello ();
+}
+
+class Stack<T>
+ where T : I, new ()
+{
+}
+
+class Test
+{
+}
+
+class X
+{
+ static void Main()
+ {
+ }
+}