You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an instance member uses a single underscore _ as its "this" or instance identifier (fsharp/fslang-suggestions#333), the F# tooling implies that any _ pattern used in the member body refers to the instance, even though it does not.
Repro steps
typeT()=member_.M()=fun _ ->()// ↑ Shows unexpected val _:T on hover.member_.N()=let_=()in()// ↑ Shows unexpected val _:T on hover.memberthis.O()=let_=()in()// ↑ Shows nothing on hover, as expected.
Expected behavior
Any _ patterns in a member body whose instance identifier is also _ should nonetheless be treated by the tooling like wildcard patterns are in general, and nothing should be shown on hover.
expected.mp4
Actual behavior
Any _ patterns in a member body whose instance identifier is also _ are treated by the tooling as though they refer to the instance identifier.
unexpected.mp4
Known workarounds
N/A.
Related information
Applies to VS and VS Code, .NET 8 and 9 (and probably earlier?).
When an instance member uses a single underscore
_as its "this" or instance identifier (fsharp/fslang-suggestions#333), the F# tooling implies that any_pattern used in the member body refers to the instance, even though it does not.Repro steps
Expected behavior
Any
_patterns in a member body whose instance identifier is also_should nonetheless be treated by the tooling like wildcard patterns are in general, and nothing should be shown on hover.expected.mp4
Actual behavior
Any
_patterns in a member body whose instance identifier is also_are treated by the tooling as though they refer to the instance identifier.unexpected.mp4
Known workarounds
N/A.
Related information
Applies to VS and VS Code, .NET 8 and 9 (and probably earlier?).