Author: martin
Date: 2006-01-15 20:04:54 -0500 (Sun, 15 Jan 2006)
New Revision: 55614
Added:
trunk/mcs/tests/gtest-235-exe.cs
trunk/mcs/tests/gtest-235-lib.cs
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/generic.cs
Log:
2006-01-16 Martin Baulig <[EMAIL PROTECTED]>
* generic.cs (ConstraintChecker.CheckConstraint): Fix #77167.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2006-01-16 00:53:05 UTC (rev 55613)
+++ trunk/mcs/gmcs/ChangeLog 2006-01-16 01:04:54 UTC (rev 55614)
@@ -1,5 +1,9 @@
2006-01-16 Martin Baulig <[EMAIL PROTECTED]>
+ * generic.cs (ConstraintChecker.CheckConstraint): Fix #77167.
+
+2006-01-16 Martin Baulig <[EMAIL PROTECTED]>
+
* typemanager.cs (TypeManager.CSharpSignature): Make this work for
ctors; fixes #77250.
Modified: trunk/mcs/gmcs/generic.cs
===================================================================
--- trunk/mcs/gmcs/generic.cs 2006-01-16 00:53:05 UTC (rev 55613)
+++ trunk/mcs/gmcs/generic.cs 2006-01-16 01:04:54 UTC (rev 55614)
@@ -1597,6 +1597,9 @@
if (ct.ResolveAsTypeStep (ec) == null)
return false;
ctype = ct.Type;
+ } else if (ctype.IsGenericParameter) {
+ int pos = ctype.GenericParameterPosition;
+ ctype = atypes [pos];
}
return Convert.ImplicitStandardConversionExists (ec,
expr, ctype);
Added: trunk/mcs/tests/gtest-235-exe.cs
===================================================================
--- trunk/mcs/tests/gtest-235-exe.cs 2006-01-16 00:53:05 UTC (rev 55613)
+++ trunk/mcs/tests/gtest-235-exe.cs 2006-01-16 01:04:54 UTC (rev 55614)
@@ -0,0 +1,11 @@
+// Compiler options: /r:gtest-235-lib.dll
+using System;
+
+class GettingStarted
+{
+ public static void Main ()
+ {
+ MyList<string> names = new MyList<string> ();
+ names.AddAll<string> ();
+ }
+}
Property changes on: trunk/mcs/tests/gtest-235-exe.cs
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/mcs/tests/gtest-235-lib.cs
===================================================================
--- trunk/mcs/tests/gtest-235-lib.cs 2006-01-16 00:53:05 UTC (rev 55613)
+++ trunk/mcs/tests/gtest-235-lib.cs 2006-01-16 01:04:54 UTC (rev 55614)
@@ -0,0 +1,10 @@
+// Compiler options: /t:library
+using System;
+
+public class MyList<T>
+{
+ public void AddAll<U> ()
+ where U : T
+ {
+ }
+}
Property changes on: trunk/mcs/tests/gtest-235-lib.cs
___________________________________________________________________
Name: svn:executable
+ *
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches