Project
ReSharper
Priority
Critical
Type
Bug
Fix versions
Mirabile Futurum
State
Open
Assignee
Olga Lobacheva
Subsystem
PSI
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Vladimir Reshetnikov
    3 years ago (01 Feb 2009 01:53)
  • Updated by   Olga Lobacheva
    7 months ago (29 Jun 2011 19:41)
  • Jira: RSRP-93832
    (history, comments)
 
RSRP-93832 error CS0121: The call is ambiguous between the following methods or properties: 'B<S>.Foo<T>(T, params S[])' and 'B<S>.Foo<T>(T, params T[])'
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
class A : B<int>
{
    static void Main()
    {
        new A().Foo(1); // error CS0121: The call is ambiguous between the following methods or properties: 'B<S>.Foo<T>(T, params S[])' and 'B<S>.Foo<T>(T, params T[])'
    }

    public override void Foo<T>(T x, int[] y) { }
    public override void Foo<T>(T x, params T[] y) { }
}

class B<S>
{
    public virtual void Foo<T>(T x, params S[] y) { }
    public virtual void Foo<T>(T x, params T[] y) { }
}
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (0)
 
Vladimir Reshetnikov
  Vladimir Reshetnikov
10 Feb 2009 23:56
3 years ago
Ignore overrides during member lookup and overload resolution.