jfmengels/elm-review-simplify
Vedi su GitHubRemoves thunk in decoder, causes infinite loop
Open
#318 aperta il 24 ago 2024
bughelp wanted
Metriche repository
- Star
- (22 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Hello! I've found a corner case when simplifying decoders.
The above simplification looks fine at first glance. The problem is that it actually changes the meaning of the code. There's a reason this decoder was written this way, using a thunk: this snippet of code lives inside the compose function, and after simplification, it will cause the function to recursively call itself in an infinite loop.