Project
ReSharper
Priority
Critical
Type
Bug
Fix versions
5.0
State
Fixed
Assignee
Olga Lobacheva
Subsystem
PSI
Affected versions
No Affected versions
Fixed in build
5.0.1648.15  
  • Created by   Vladimir Reshetnikov
    2 years ago (03 Nov 2009 01:18)
  • Updated by   Olga Lobacheva
    18 months ago (14 Jul 2010 18:52)
  • Jira: RSRP-128672
    (history, comments)
 
RSRP-128672 error CS0121: The call is ambiguous between the following methods or properties: 'IA.Foo(ref int)' and 'IA.Foo(ref long)'
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
using System.Runtime.InteropServices;

[ComImport]
[Guid("09133803-EF59-4467-9135-255A65B606C2")]
interface IA
{
    void Foo(ref int x);    
    void Foo(ref long y);    
}

class A : IA
{
    private static void Main()
    {
        IA x = new A();
        x.Foo(1); // error CS0121: The call is ambiguous between the following methods or properties: 'IA.Foo(ref int)' and 'IA.Foo(ref long)'
    }

    public void Foo(ref int x)
    {
    }

    public void Foo(ref long y)
    {
    }
}
Comments (1)
 
History
 
Linked Issues (?)
 
TeamCity Changes (1)
 
Olga Lobacheva
  Olga Lobacheva
23 Dec 2009 21:22
2 years ago
Do you know whether it is compiler bug?