dotnet / dotnet/fsharp

Comparison of incorrectly annotated classes hides original problems

Open
#16,511 0 comments 0 reactions 0 assignees View on GitHub
Area-Diagnostics Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

Discovered when playing with F# comparison rules.

Look:
![image](https://github.com/dotnet/fsharp/assets/5451366/77b6495b-74c0-4f36-8fe0-e570d684751a)

This is the correct error. But once I add a comparison test, the error changes and becomes confusing:
![image](https://github.com/dotnet/fsharp/assets/5451366/e21012bd-c161-4516-839e-d1e6d9deaec8)

**Expected behavior**

Both errors show up.

**Actual behavior**

The new error hides the original one.

**Known workarounds**

Don't do this.

**Related information**

This is pretty much an edge case and this bug is worth giving it attention only if hides some more serious issue.

Shot in the dark, @auduchinok do you think this can be related to parser rules and/or easily fixed there?

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.