Author: raja
Date: 2006-03-20 09:33:34 -0500 (Mon, 20 Mar 2006)
New Revision: 58187

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/generic.cs
Log:
Fix #77852
* generic.cs (Constraints.Resolve): Change argument to IResolveContext.
(TypeParameter.Resolve): Update to change.
(ConstraintChecker.CheckConstraints): Resolve type-argument
constraints before use.


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2006-03-20 14:31:59 UTC (rev 58186)
+++ trunk/mcs/gmcs/ChangeLog    2006-03-20 14:33:34 UTC (rev 58187)
@@ -1,3 +1,11 @@
+2006-03-20  Raja R Harinath  <[EMAIL PROTECTED]>
+
+       Fix #77852
+       * generic.cs (Constraints.Resolve): Change argument to IResolveContext.
+       (TypeParameter.Resolve): Update to change.
+       (ConstraintChecker.CheckConstraints): Resolve type-argument
+       constraints before use.
+
 2006-03-16  Martin Baulig  <[EMAIL PROTECTED]>
 
        * generic.cs

Modified: trunk/mcs/gmcs/generic.cs
===================================================================
--- trunk/mcs/gmcs/generic.cs   2006-03-20 14:31:59 UTC (rev 58186)
+++ trunk/mcs/gmcs/generic.cs   2006-03-20 14:33:34 UTC (rev 58187)
@@ -171,7 +171,7 @@
                ///   Resolve the constraints - but only resolve things into 
Expression's, not
                ///   into actual types.
                /// </summary>
-               public bool Resolve (EmitContext ec)
+               public bool Resolve (IResolveContext ec)
                {
                        if (resolved)
                                return true;
@@ -630,7 +630,7 @@
                public bool Resolve (DeclSpace ds)
                {
                        if (constraints != null) {
-                               if (!constraints.Resolve (ds.EmitContext)) {
+                               if (!constraints.Resolve (ds)) {
                                        constraints = null;
                                        return false;
                                }
@@ -1489,6 +1489,8 @@
                        if (atype.IsGenericParameter) {
                                GenericConstraints agc = 
TypeManager.GetTypeParameterConstraints (atype);
                                if (agc != null) {
+                                       if (agc is Constraints)
+                                               ((Constraints) agc).Resolve 
(ec);
                                        is_class = 
agc.HasReferenceTypeConstraint;
                                        is_struct = agc.HasValueTypeConstraint;
                                } else {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to