Improve error message when let! _ is last statement in computation expressions
Open
Area-Diagnostics
Feature Improvement
Theme-Simple-F#
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Consider the following code:
let x() = async { return () }
let y =
async {
let! _ = x()
} // compile error - Unexpected symbol }
let z =
async {
do! x()
}
If `x` returns anything else that unit then you can't use `do!` and you have to do:
let y =
async {
let! _ = x()
()
}
This is hard to explain to newcomers - especially given the error mesage.
Contributor guide
Assessment
This issue has not been assessed yet.