Unhelpful error when using wrongly indented yield! in list comprehension
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Consider the following code:
module X
let view (props:'a list) (elements:'b list) : 'c list = []
let scrollView (props:'a list) (elements:'b list) : 'c list = []
let wizard = []
let view model =
view [
]
[ yield scrollView []
[
]
yield! wizard
]
It shows two error messages:


Both are not helpful here and the first one is actually wrong since we have balanced brackets.
The real issue is that the line with `yield!` is indented one char to far.
Contributor guide
Assessment
This issue has not been assessed yet.