-
Notifications
You must be signed in to change notification settings - Fork 878
Improve Error Reporting: Make FS0072 less intimidating. #13013
Copy link
Copy link
Closed
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature RequestTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Area-Diagnosticsmistakes and possible improvements to diagnosticsmistakes and possible improvements to diagnosticsFeature RequestTheme-Simple-F#A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.
Type
Projects
- StatusShow more project fieldsDone
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: