dotnet / dotnet/fsharp

Wrong actual type is captured in diagnostic

Open
#18,905 1 comment 1 reaction 0 assignees View on GitHub
Bug Needs-Triage
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

In the code below the expected type is `int` and the actual is `string`:

```fsharp
module Module

type T() =
static member P1 = T.P2 + 1
static member P2 = ""
```

Image

However, the diagnostic data captures the opposite:

Image

This seems to be a regression in #18851. cc @DedSec256

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.