[Mono-dev] [PATCH] MonoMethod.cs
Matthew Metnetsky
met at uberstats.com
Mon Mar 2 13:52:13 EST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gonzalo Paniagua Javier wrote:
> On Fri, 2009-02-27 at 09:50 -0500, Matthew Metnetsky wrote:
>> I was migrating some code from Mono 1.x to .NET 3.5 and came across a
>> very small bug. I was calling MonoMethod.Invoke like so:
>>
>> MethodInfo method = type.GetMethod("Foo"); // Foo(int i, string name);
>>
>> method.Invoke(obj,
>> BindingFlags.ExactBinding,
>> new CustomerBinder(),
>> new object[]{"0", "one"},
>> null);
>
> Could you also provide a NUnit test like the ones we have in
> corlib/Test/System.Reflection/ for this case?
Gonzalo,
I'm just about finished writing the tests, but I've hit one issue and
was wondering how you would like me to deal with it.
When BindingFlags.ExactBinding is used now and the call to
MonoMethod.Invoke has invalid argument types the process seg-faults
inside mono_object_unbox:
assertion failed: (obj->vtable->klass->valuetype)
So my question is where would you like an ArgumentException thrown (as
MS does):
1) MonoMethod.cs
2) icall.c / where the path leads me
Thoughts?
Regards,
~ Matthew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmsKtsACgkQLrcoBjlTBf1jFACguhruRbF6kFvXRXaO4GRXF7Vn
QMwAn0YtOA4V39WDH36d3TnmznHWKOiN
=BBcI
-----END PGP SIGNATURE-----
More information about the Mono-devel-list
mailing list