On 03.03.2016 14:36, Jonathan Mitchell wrote:
HI

I want to call the following constructor via the embedded API:

public CloudClient(Func<string, string> filePathCallback)

All my other embedded method and constructor calls work okay but there is an issue 
with this one - it is the only place I use a System.Func<T>.
The API reports that a method cannot be found for signature 
.ctor(System.Func`2<string, string>)
When I dump out the class method names I see .ctor(System.Func`2<string, 
string>) listed.

Any ideas on this one?

It looks like a bug in mono_method_desc_new ():

https://github.com/mono/mono/blob/master/mono/metadata/debug-helpers.c#L378

The function is treating

        .ctor(System.Func`2<string, string>)

like a method with 2 arguments:

arg0 = System.Func`2<string
arg1 = string>

This is obviously wrong :)

The function is then storing the (wrong) argument count
for optimization purposes, and the comparison of methods
is starting to fail:

https://github.com/mono/mono/blob/master/mono/metadata/debug-helpers.c#L447

Robert


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to