Hi Roman,

On Sun, Nov 7, 2010 at 7:51 AM, Roman <[email protected]> wrote:
> Hi Jb - seems I'm running into the same issue with Cecil 0.9.4. The
> DeclaringType on a TypeReference for a nested class is set to null
> whenever generics are involved. Here's a test case:
>
> public class OuterGeneric<O>
> {
>    public class InnerGeneric<I>
>    {
>    }
>
>    public class InnerNonGeneric
>    {
>    }
> }
>
> public class OuterNonGeneric
> {
>    public class InnerGeneric<I>
>    {
>    }
>
>    public class InnerNonGeneric
>    {
>    }
> }
>
> class TestClass
> {
>    public OuterGeneric<int>.InnerGeneric<int> Method1()
>    {
>        return null;
>    }
>
>    public OuterGeneric<int>.InnerNonGeneric Method2()
>    {
>        return null;
>    }
>
>    public OuterNonGeneric.InnerGeneric<int> Method3()
>    {
>        return null;
>    }
>
>    public OuterNonGeneric.InnerNonGeneric Method4()
>    {
>        return null;
>    }
> }
>
> In the example above, only Method4 has a value in its return type's
> DeclaringType. The other three are set to null. Bug?

Looks definitely like it. Thanks for the test-case, I'll investigate.

Jb

-- 
--
mono-cecil

Reply via email to