Author: miguel
Date: 2006-08-14 01:32:31 -0400 (Mon, 14 Aug 2006)
New Revision: 63703
Modified:
trunk/mcs/class/corlib/System/ChangeLog
trunk/mcs/class/corlib/System/MonoType.cs
Log:
2006-08-14 Miguel de Icaza <[EMAIL PROTECTED]>
* MonoType.cs: Do the argument testinf for SetField later,
otherwise the implicit (and not documented, but already considered
side effect of checking SetProperty) did not work.
Bug fix #79023
Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog 2006-08-14 05:30:14 UTC (rev
63702)
+++ trunk/mcs/class/corlib/System/ChangeLog 2006-08-14 05:32:31 UTC (rev
63703)
@@ -1,3 +1,11 @@
+2006-08-14 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * MonoType.cs: Do the argument testinf for SetField later,
+ otherwise the implicit (and not documented, but already considered
+ side effect of checking SetProperty) did not work.
+
+ Bug fix #79023
+
2006-08-13 Atsushi Enomoto <[EMAIL PROTECTED]>
* String.cs : Normalize() and IsNormalized() implementation.
Modified: trunk/mcs/class/corlib/System/MonoType.cs
===================================================================
--- trunk/mcs/class/corlib/System/MonoType.cs 2006-08-14 05:30:14 UTC (rev
63702)
+++ trunk/mcs/class/corlib/System/MonoType.cs 2006-08-14 05:32:31 UTC (rev
63703)
@@ -325,8 +325,6 @@
throw new ArgumentException ("invokeAttr");
if ((invokeAttr & BindingFlags.InvokeMethod) != 0 &&
(invokeAttr & (BindingFlags.SetProperty|BindingFlags.SetField)) != 0)
throw new ArgumentException ("invokeAttr");
- if ((invokeAttr & BindingFlags.SetField) != 0 && ((args
== null) || args.Length != 1))
- throw new ArgumentException ("invokeAttr");
if ((namedParameters != null) && ((args == null) ||
args.Length < namedParameters.Length))
throw new ArgumentException ("namedParameters
cannot be more than named arguments in number");
@@ -386,6 +384,9 @@
}
/* try GetProperty */
} else if ((invokeAttr & BindingFlags.SetField) != 0) {
+ if ((args == null) || args.Length != 1)
+ throw new ArgumentException
("invokeAttr");
+
FieldInfo f = GetField (name, invokeAttr);
if (f != null) {
f.SetValue (target, args [0]);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches