Improve Error Reporting: Make FS0072 less intimidating. #13013
Labels
Area-Diagnostics
mistakes and possible improvements to diagnostics
Feature Request
Theme-Simple-F#
A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Milestone
What
The following code leads to the following error:
Why
The message is overly verbose and complicated, using words like "indeterminate" and so on. In reality, all we're trying to say is: "I couldn't infer what this type is! Please add an annotation to tell me directly.". We could also provide some guidance to explain that the compiler cannot generally infer types from C#.
How
How about:
or
We could also add some "background" information as well:
The text was updated successfully, but these errors were encountered: