Author: martin
Date: 2005-04-29 05:21:03 -0400 (Fri, 29 Apr 2005)
New Revision: 43781
Added:
trunk/mcs/tests/gen-149.cs
trunk/mcs/tests/gen-150.cs
trunk/mcs/tests/gen-151.cs
Log:
New tests.
Added: trunk/mcs/tests/gen-149.cs
===================================================================
--- trunk/mcs/tests/gen-149.cs 2005-04-29 09:19:47 UTC (rev 43780)
+++ trunk/mcs/tests/gen-149.cs 2005-04-29 09:21:03 UTC (rev 43781)
@@ -0,0 +1,17 @@
+using System;
+
+static class Test1 {
+ public class IOp<T> { }
+ static void Foo<S,OP>(uint v) where OP : IOp<S> { }
+};
+
+static class Test2 {
+ public class IOp<T> { }
+ static void Foo<T,OP>(uint v) where OP : IOp<T> { }
+};
+
+class X
+{
+ static void Main ()
+ { }
+}
Added: trunk/mcs/tests/gen-150.cs
===================================================================
--- trunk/mcs/tests/gen-150.cs 2005-04-29 09:19:47 UTC (rev 43780)
+++ trunk/mcs/tests/gen-150.cs 2005-04-29 09:21:03 UTC (rev 43781)
@@ -0,0 +1,18 @@
+using System;
+static class Test1 {
+ public interface IOp<T> {
+ T Func(uint v);
+ }
+ public struct Op : IOp<ushort>, IOp<uint> {
+ ushort IOp<ushort>.Func(uint v) { return (ushort )(v * 2); }
+ uint IOp<uint>.Func(uint v) { return v * 4; }
+ }
+ static void Foo<T,OP>(uint v) where T:struct where OP : IOp<T> {
+ OP op = default(OP);
+ System.Console.WriteLine( op.Func(v) );
+ }
+ static public void Main() {
+ Foo<ushort, Op>(100);
+ Foo<uint, Op>(100);
+ }
+};
Added: trunk/mcs/tests/gen-151.cs
===================================================================
--- trunk/mcs/tests/gen-151.cs 2005-04-29 09:19:47 UTC (rev 43780)
+++ trunk/mcs/tests/gen-151.cs 2005-04-29 09:21:03 UTC (rev 43781)
@@ -0,0 +1,12 @@
+class Test<T> where T: struct{
+ public Test(){
+ T s = new T();
+ }
+}
+
+class X
+{
+ static void Main ()
+ { }
+}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches