[Mono-bugs] [Bug 423791] New: [gmcs] Type Inferencing doesn't extend to `params' arrays

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 5 15:04:26 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=423791


           Summary: [gmcs] Type Inferencing doesn't extend to `params'
                    arrays
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


The following fragment fails to compile:

  public static R Match<T,R>(this T self, 
   params Func<T,Maybe<R>>[] matchers) {...}

  "foo".Match (
    s => s.Length != 3 ? null : Maybe.C("bar!"),
    s => Maybe.C(s)));

gmcs complains: 
match.cs(116,31): error CS0411: The type arguments for method
`Extensions.Match<T,R>(this T, params System.Func<T,Maybe<R>>[])' cannot be
inferred from the usage. Try specifying the type arguments explicitly

It does compile under .NET.


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