fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

Name resolution environment in record field does not contain generic type

Open kerams opened this issue 3 years ago • 0 comments

type U<'abc> =
    | C of ab

type R<'abc> = {
    F: ab
}

Intellisense completions on ab in U contain 'abc (as of https://github.com/dotnet/fsharp/pull/12933), but the generic type is missing on ab in R. This is because the name resolution environment returned by GetBestEnvForPos in the latter case does not contain the generic type, i.e. nenv.eTypars is empty.

kerams avatar Apr 30 '22 06:04 kerams