Sorry, it is not a good example. The only good example I found is when
I use Array3.init<T1,T2,T3,classT> which is in the fslib.dll, which is
the free F# library from Microsoft. The class definitions of fslib.dll
differ from the usual ones. I'll try to examine it further...

On Jun 9, 7:01 pm, emvy <[EMAIL PROTECTED]> wrote:
> The problem is the following, it seems:
> Assume that you have an assembly (A1) referencing an other
> assembly(A2). A2 has a method in it which returns a multidimensional
> array. A1 calls this method somewhere. If A1 is opened / saved by
> Cecil, then the signatures of methods which return a MD array will
> change from [,,] like to [0...,0...,0...]. This is not a problem in
> the general case, when the method is specified in A1, because the type
> reference is also changed. But because Cecil changes A1 but not A2, on
> assembly loading, Fusion will be unable to associate the method
> reference called from A1 and the method definition in A2, because in
> A1, the signatures changed.
>
> Sample code:
> A1: (first assembly:)
>
> namespace ArrayReturnType
> {
>   class Program
>   {
>     static void Main(string[] args)
>     {
>       ArrayReturn.GetArray();
>     }
>   }
>
> }
>
> A2:
> namespace ArrayReturnTypeDLL
> {
>   public class ArrayReturn
>   {
>     public static int[,] GetArray()
>     {
>       return new int[1, 1];
>     }
>   }
>
> }
>
> If you load / save A1, peverify will be unable to resolve the tokens
> of the method.
>
> On Jun 9, 6:07 pm, "Jb Evain" <[EMAIL PROTECTED]> wrote:
>
> > On 6/9/08, emvy <[EMAIL PROTECTED]> wrote:
>
> > >  And I have to tell that the problem occurs in a situation when a
> > >  generic method returns an array of its generic parameters.
>
> > Could you please provide a test case?
>
> > --
> > Jb Evain  <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to