C# extensions show up in VS auto-complete as overloads on unrelated types
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Extensions defined on typed arrays (e.g. `int[]`) in a C# library show up in VS auto-complete on unrelated types in F# code. This seems to happen if the type has a method with the same name as the extension.
**Repro steps**
[ConsoleApp1.zip](https://github.com/dotnet/fsharp/files/10467393/ConsoleApp1.zip)
```csharp
namespace ClassLibrary1
{
public static class ArrayExtensions
{
public static void DoSomething(this int[] array, bool thisIsAnExtension)
{ }
}
}
```
```fsharp
open ClassLibrary1
type Foo() =
// Method with the same name as the array extension.
member x.DoSomething(value : int) = ()
// Works as intended
let array = [| 0; 1; 2 |]
array.DoSomething(true)
// Does not compile as intended, but shows up in auto-complete
let foo = Foo()
foo.DoSomething(false)
```
**Expected behavior**
The extension should not show up in auto-complete as an overload.
**Actual behavior**
The extension shows up in auto-complete.

The compiler error also lists the extension as possible overload:

**Related information**
* Windows 10
* .NET 7
* Visual Studio 17.4.4
Contributor guide
Assessment
This issue has not been assessed yet.