dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.82k stars 773 forks source link

Internal error when dotting into delegate with 2 or more type parameters #17226

Closed brianrourkeboll closed 1 month ago

brianrourkeboll commented 1 month ago

This is not really important, but the compiler service hits an internal error when dotting into a delegate with two or more type parameters.

Repro steps

type D<'T, 'U> = delegate of 'T -> 'U
D.

Visual Studio

image

image

image

VS Code with Ionide

image

Expected behavior

No internal error.

Actual behavior

Internal error from this:

https://github.com/dotnet/fsharp/blob/ef2307d18b2d97312680187b3d189a0076fdaa94/src/Compiler/Checking/NameResolution.fs#L1108