[GeneratedComInterface] Generates ambiguous ABI_ overloads when interface methods differ only in parameter types
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Description
I discovered this when trying to use [GeneratedComInterface] on IDWriteGdiInterop1, which inexplicably has two GetFontSignature which differ only in a pointer-parameter type. https://learn.microsoft.com/en-us/windows/win32/api/dwrite_3/nn-dwrite_3-idwritegdiinterop1
### Reproduction Steps
```c#
[Guid("00000000-0000-0000-0000-000000000001"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), GeneratedComInterface]
public partial interface IBase
{
}
[Guid("00000000-0000-0000-0000-000000000002"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), GeneratedComInterface]
public partial interface IDerived : IBase
{
}
[Guid("00000000-0000-0000-0000-000000000003"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), GeneratedComInterface]
public partial interface IRepro
{
void Test(IDerived foo);
void Test(IBase foo);
}
```
### Expected behavior
Compiles & works.
### Actual behavior
Compile error:
> Microsoft.Interop.ComInterfaceGenerator\Repro.IRepro.cs(93,25,93,33): error CS0111: Type 'InterfaceImplementation' already defines a member called 'ABI_Test' with the same parameter types
### Regression?
_No response_
### Known Workarounds
_No response_
### Configuration
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.