[Mono-bugs] [Bug 611965] New: Compiler crash with generic method<T>(T?[] array) where T : struct

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jun 5 08:57:53 EDT 2010


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

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


           Summary: Compiler crash with generic method<T>(T?[] array)
                    where T : struct
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: M8R-2yr72d at mailinator.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=367302)
 --> (http://bugzilla.novell.com/attachment.cgi?id=367302)
Monodevelop crash log

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

I had the following formatting method in my code:

private string formatArray<T>(T?[] array) where T : struct
{
    return "[" +
           string.Join(", ", (string[]) new List<T?>(array).ConvertAll
                             (
                                 nullableValue
                                 =>
                                 (nullableValue == null ?
                                 "?" :
                                 nullableValue.Value.ToString())
                             ).ToArray()) +
           "]";
}

In the attachment, you can see that the Mono compiler crashes when compiling
this. I am now using a non-generic version and it works.

Reproducible: Always

-- 
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