And the file goes here...
2005/9/2, Kamil Skalski [EMAIL PROTECTED]:
I attach the more complete and correct patch - MakeGenericMethod is
added to MethodBase instead of MethodInfo, I made necessary changes to
gmcs and mbas, also the change to GenericParameterAttributes is
included.
One question I would like to ask is if I should also change the
runtime icalls from BindTypeParameters to MakeGenericType /
MakeGenericMethod, or should this be left for another patch. If this
patch is ok in its state, I will commit.
2005/8/30, Michal Moskal [EMAIL PROTECTED]:
Hello,
The MS Aug CTP release removes BindGenericParameters/Arguments methods
from System.Type and MethodInfo. Instead MakeGenericType and
MakeGenericMethod should be used. Mono has the first one implemneted.
The attached patch implemnets the second one.
2005-08-30 Michal Moskal [EMAIL PROTECTED]
* MethodInfo.cs: Add MakeGenericMethod to match Aug CTP API.
--
Michal Moskal,
http://nemerle.org/~malekith/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list
--
Kamil Skalski
http://nazgul.omega.pl
--
Kamil Skalski
http://nazgul.omega.pl
Index: bmcs/generic.cs
===
--- bmcs/generic.cs (wersja 49356)
+++ bmcs/generic.cs (kopia robocza)
@@ -33,7 +33,7 @@
}
public bool HasValueTypeConstraint {
- get { return (Attributes GenericParameterAttributes.ValueTypeConstraint) != 0; }
+ get { return (Attributes GenericParameterAttributes.NotNullableValueTypeConstraint) != 0; }
}
public virtual bool HasClassConstraint {
@@ -195,7 +195,7 @@
if (sc == SpecialConstraint.ReferenceType)
attrs |= GenericParameterAttributes.ReferenceTypeConstraint;
else
- attrs |= GenericParameterAttributes.ValueTypeConstraint;
+ attrs |= GenericParameterAttributes.NotNullableValueTypeConstraint;
continue;
}
@@ -1733,7 +1733,7 @@
if (tc != null)
return tc.IsGeneric ? tc.CountTypeParameters : 0;
else
-return t.HasGenericArguments ? t.GetGenericArguments ().Length : 0;
+return t.IsGenericType ? t.GetGenericArguments ().Length : 0;
}
public static Type[] GetTypeArguments (Type t)
@@ -2171,7 +2171,7 @@
if (infered_types [i] == null)
return false;
- method = method.BindGenericParameters (infered_types);
+ method = method.MakeGenericMethod (infered_types);
return true;
}
@@ -2241,7 +2241,7 @@
if (!InferTypeArguments (param_types, arg_types, infered_types))
return false;
- method = method.BindGenericParameters (infered_types);
+ method = method.MakeGenericMethod (infered_types);
return true;
}
@@ -2269,7 +2269,7 @@
if (!InferTypeArguments (param_types, arg_types, infered_types))
return false;
- method = method.BindGenericParameters (infered_types);
+ method = method.MakeGenericMethod (infered_types);
return true;
}
Index: bmcs/ecore.cs
===
--- bmcs/ecore.cs (wersja 49356)
+++ bmcs/ecore.cs (kopia robocza)
@@ -2992,7 +2992,7 @@
if (gen_params.Length != atypes.Length)
continue;
-list.Add (mi.BindGenericParameters (atypes));
+list.Add (mi.MakeGenericMethod (atypes));
}
if (list.Count 0) {
Index: gmcs/generic.cs
===
--- gmcs/generic.cs (wersja 49356)
+++ gmcs/generic.cs (kopia robocza)
@@ -33,7 +33,7 @@
}
public bool HasValueTypeConstraint {
- get { return (Attributes GenericParameterAttributes.ValueTypeConstraint) != 0; }
+ get { return (Attributes GenericParameterAttributes.NotNullableValueTypeConstraint) != 0; }
}
public virtual bool HasClassConstraint {
@@ -199,7 +199,7 @@
if (sc == SpecialConstraint.ReferenceType)
attrs |= GenericParameterAttributes.ReferenceTypeConstraint;
else
- attrs |= GenericParameterAttributes.ValueTypeConstraint;
+ attrs |= GenericParameterAttributes.NotNullableValueTypeConstraint;
continue;
}
@@ -1692,7 +1692,7 @@
if (tc != null)
return tc.IsGeneric ? tc.CountTypeParameters : 0;
else
-return t.HasGenericArguments ? t.GetGenericArguments ().Length : 0;
+return t.IsGenericType ? t.GetGenericArguments ().Length : 0;
}
public static Type[] GetTypeArguments (Type t)
@@ -2128,7 +2128,7 @@
if (infered_types [i] == null)
return false;
- method = method.BindGenericParameters (infered_types);
+ method = method.MakeGenericMethod (infered_types);
return true;
}
@@ -2199,7 +2199,7 @@
if (!InferTypeArguments (param_types, arg_types, infered_types))
return false;
- method = method.BindGenericParameters (infered_types);
+ method = method.MakeGenericMethod (infered_types);