dotnet / dotnet/fsharp

Improve error message when yield! was used but yield is needed and vice versa

Open
#4,233 4 comments 2 reactions 0 assignees View on GitHub
Area-Diagnostics Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

For newcomers in elmish views it's sometimes not easy to understand when to use yield vs yield!. And the compiler is not really useful here:

let div _ _ = 1

let subView _ _ = [1; 2]

let view model dispatch =
[
yield! subView model dispatch
yield! div [] []
]

![image](https://user-images.githubusercontent.com/57396/35192170-ce1f5b38-fe8c-11e7-8b3f-796600bacefe.png)

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.