Closed stevensonmt closed 5 years ago
Thank you for the report! I am wrapping up an overhaul of the parser that has better error messages. For your example, the error is now:
-- UNFINISHED IF ------------------------------------------------------ temp.elm
I was expecting to see an `else` branch after this:
3| if subToggle then
4| let
5| angle =
6| turns (Time.inMinutes model)
7|
8| handX =
9| toString (50 + 40 * cos angle)
10|
11| handY =
12| toString (50 + 40 * sin angle)
13| in
14| svg [ viewBox "0 0 100 100", width "300px" ]
15| [ circle [ cx "50", cy "50", r "45", fill "#0B79CE" ] []
16| , line [ x1 "50", y1 "50", x2 handX, y2 handY, stroke "#023963" ] []
17| ]
^
I know what to do when the condition is `True`, but not when it is `False`.
Add an else branch to handle that scenario!
This should become available when Elm 0.19.1 is released. Thanks again for reporting this case!
This won't compile and complains of:
What it really needs is an
else
statement though.