[Mono-bugs] [Bug 621599] New: Verifier incorrectly rejects this code snippet

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 12 10:01:25 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=621599

http://bugzilla.novell.com/show_bug.cgi?id=621599#c0


           Summary: Verifier incorrectly rejects this code snippet
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: verifier
        AssignedTo: rkumpera at novell.com
        ReportedBy: lucas.meijer at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4

compile this program with gmcs, and run pedump --verify code   on the resulting
assembly.  THe verifier will reject it saying:

Error: Invalid generic type instantiation of type .SerializerItemProxy`2
(generic args don't respect target's constraints) at 0x0000

While MS's  peverify thinks it is fine.


public class SerializerItemProxy<TBaseClass,TActualClass> :
SerializerProxy<TActualClass> where TBaseClass: class where TActualClass:
class, TBaseClass
{

}

public class SerializerProxy<T>
{
        static SerializerProxy<TItem> MakeItem<TItem>() where TItem:class,T
        {
                return new SerializerItemProxy<TItem,TItem>();
        }
}

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list