[Mono-bugs] [Bug 580887] New: fails to compile array initialization expression

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 18 08:50:39 EST 2010


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

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


           Summary: fails to compile array initialization expression
    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: rkvinge at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Sample code:

using System;
class C {
    public static readonly Action<object>[] Items = {
        (a) => {
            int timeoutMilliseconds = 0;
        },
    };
}

results in:
> gmcs -target:library test.cs 
test.cs(4,49): error CS0622: Can only use array initializer expressions to
assign to array types. Try using a new expression instead

Note that removing the variable declaration makes it compile.

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