test1.cs, test2.cs, test3.cs : New test cases for Bug #76671.
authorAnkit Jain <radical@corewars.org>
Tue, 15 Nov 2005 10:56:34 +0000 (10:56 -0000)
committerAnkit Jain <radical@corewars.org>
Tue, 15 Nov 2005 10:56:34 +0000 (10:56 -0000)
svn path=/trunk/mono/; revision=53046

mono/dis/tests/Changelog
mono/dis/tests/test1.cs [new file with mode: 0644]
mono/dis/tests/test2.cs [new file with mode: 0644]
mono/dis/tests/test3.cs [new file with mode: 0644]

index 6f49ee6d4407e410819325ea0ab48fc4a90da579..71e0bed52531dfb3666aec97213cd5a4cadd13af 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-15  Ankit Jain  <jankit@novell.com>
+
+       * test1.cs, test2.cs, test3.cs: New test cases for Bug #76671.
+
 2005-11-08  Ankit Jain  <jankit@novell.com>
 
        * gen-dump-table.cs: New test case (for r52695).
diff --git a/mono/dis/tests/test1.cs b/mono/dis/tests/test1.cs
new file mode 100644 (file)
index 0000000..b28fe8b
--- /dev/null
@@ -0,0 +1,23 @@
+/* Bug #76671
+   Note: gmcs currently emits duplicate TypeSpecs, so this
+        case doesn't get exposed, so use csc compiled
+        assemblies till gmcs is fixed.
+*/
+
+class X<T1> {
+       public static void Xfoo () {
+               X<T1>.Xfoo();
+       }
+}
+
+class Y<T2> {
+       public static void Yfoo () {
+               X<T2>.Xfoo();
+       }
+}
+
+class Test {
+       static void Main ()
+       {
+       }
+}
diff --git a/mono/dis/tests/test2.cs b/mono/dis/tests/test2.cs
new file mode 100644 (file)
index 0000000..0d19757
--- /dev/null
@@ -0,0 +1,50 @@
+/* Bug #76671
+   Note: gmcs currently emits duplicate TypeSpecs, so this
+        case doesn't get exposed, so use csc compiled
+        assemblies till gmcs is fixed.
+
+   Array of type params
+*/
+using System;
+
+class list <T> {
+       public static void bar ()
+       {
+               gen<int, T[][]>.foo ();
+               gen<int[][], T>.foo ();
+               gen<int, T[][,]>.foo ();
+               gen<T[,,], int>.foo ();
+       }
+}
+
+class list_two <D> {
+       public static void bar ()
+       {
+               gen<int, D[][]>.foo ();
+               gen<int[][], D>.foo ();
+               gen<int, D[][,]>.foo ();
+               gen<D[,,], int>.foo ();
+       }
+}
+
+class list_three <F> {
+       public static void bar ()
+       {
+               gen<int, F[][]>.foo ();
+               gen<int[][], F>.foo ();
+               gen<int, F[][,]>.foo ();
+               gen<F[,,], int>.foo ();
+       }
+}
+
+class gen <Q, R> {
+       public static void foo () 
+       {
+       }
+}
+
+class Test {
+       public static void Main ()
+       {
+       }
+}
diff --git a/mono/dis/tests/test3.cs b/mono/dis/tests/test3.cs
new file mode 100644 (file)
index 0000000..3a6a07e
--- /dev/null
@@ -0,0 +1,25 @@
+/* Bug #76671
+   Note: gmcs currently emits duplicate TypeSpecs, so this
+        case doesn't get exposed, so use csc compiled
+        assemblies till gmcs is fixed.
+*/
+
+using System;
+
+class X<T1> {
+       public static void Xfoo () {
+               Console.WriteLine (typeof (T1).ToString ());
+       }
+}
+
+class Y<T2> {
+       public static void Yfoo () {
+               Console.WriteLine (typeof (T2).ToString ());
+       }
+}
+
+class Test {
+       static void Main ()
+       {
+       }
+}