[Mono-bugs] [Bug 494243] New: Crash on explicitly specifying the wrong type in a generic extension method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Apr 12 16:44:25 EDT 2009


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


           Summary: Crash on explicitly specifying the wrong type in a
                    generic extension method
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: em at nerd.ocracy.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


gmcs crashes on invalid code when explicitly specifying the wrong type in a
generic extension method, instead of returning an error (CS1503, I presume).

-------------------8<-------------------
using System;
using System.Collections;

static class Extensions
{
    public static void Frobnicate<T>(this T foo) where T : IList {}
}

public class Test
{
    IList mFoo;

    void Frobnicate() {
        mFoo.Frobnicate<ArrayList>();
    }
}
-------------------8<-------------------

-- 
Configure bugmail: http://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.


More information about the mono-bugs mailing list