https://bugzilla.novell.com/show_bug.cgi?id=469553

User [email protected] added comment
https://bugzilla.novell.com/show_bug.cgi?id=469553#c1


Rodrigo Kumpera <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
          Component|JIT                         |generics
         AssignedTo|[email protected]         |[email protected]




--- Comment #1 from Rodrigo Kumpera <[email protected]>  2009-02-03 17:26:50 
MST ---
Unfortunately, this is not a verifier bug.

What happens is that the runtime doesn't assign the proper parent type for List
which later on means it won't be able to check for compatibility.

Together with that, is the fact that ilasm doesn't support System F recursive
types. So gtest-261.exe can be disassembled, but not reassembled.

The way to fix it is to make sure the runtime does set the proper super type
for List.

This can be checked by adding the following code in gtest-261.exe:
    Type lst = typeof (List<>);
    Type arg = lst.GetGenericArguments ()[0];

    Console.WriteLine (lst);
    Console.WriteLine (arg);

    Type sup = lst.BaseType;
    Type sa0 = sup.GetGenericArguments ()[0];
    Type sa1 = sup.GetGenericArguments ()[1];

    Console.WriteLine (sup);
    Console.WriteLine (sa0);
    Console.WriteLine (sa1);

    Console.WriteLine (sa1 == lst);
    Console.WriteLine (sa0 == arg);

    Type inst = typeof (Cons<,>).MakeGenericType (arg, lst.MakeGenericType
(arg));

    Console.WriteLine (inst);
    Console.WriteLine (inst == sup);


It should print:
List`1[A]
A
Cons`2[A,List`1[A]]
A
List`1[A]
True
True
Cons`2[A,List`1[A]]
True

But on mono it does print:
List`1[A]
A
Cons`2[A,List`1[A]]
A
List`1[A]
True
True
Cons`2[A,List`1[A]]
False

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to