[Mono-bugs] [Bug 614924] New: The type of an implicitly typed array cannot be inferred from an initializer

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 16 17:17:12 EDT 2010


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

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


           Summary: The type of an implicitly typed array cannot be
                    inferred from an initializer
    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:

class C {
  public static void Main ()
  {
  var thingToTest = new[] {
    new C (),
    22, 
    new object(), 
    string.Empty, 
    null };
  }
}

results in:
test.cs(6,21): error CS0826: The type of an implicitly typed array cannot be
inferred from the initializer. Try specifying array type explicitly

csc (VS2008) compiles this successfully.

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