[Mono-bugs] [Bug 442579] New: Overload resolution problem

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 7 01:33:39 EST 2008


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


           Summary: Overload resolution problem
           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: sanxiyn at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


SVN r118167.

Testcase:

using System.Collections.Generic;

public class Expression {
    public static void Block(params Expression[] expressions) {}
    public static void Block(IEnumerable<ParameterExpression> variables, params
Expression[] expressions) {}
}

public class ParameterExpression : Expression {}

public class Test {
    public static void Main() {
        Expression e = new Expression();
        Expression.Block(
            new ParameterExpression[] {},
            e
        );
    }
}

Result:

Test.cs(13,20): error CS0121: The call is ambiguous between the following
methods or properties: `Expression.Block(params Expression[])' and
`Expression.Block(System.Collections.Generic.IEnumerable<ParameterExpression>,
params Expression[])'
Test.cs(4,24): (Location of the symbol related to previous error)
Test.cs(5,24): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

Compiles fine on csc.

Blocks DLR.


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