You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like I've found a bug which was likely introduced with the formatting for early return if statements (#7060). I have a case where an assignment using if/then/else causes a formatting failure, and is being formatted with a hanging else in the debug output as though it were an early return:
setModels : Client, List Str -> Client
setModels = \client, models ->
modelsOption = if List.isEmpty models
then Option.none {}
else Option.some models
{ client & models: modelsOption }
Causes a format failed bug, but gets formatted as the following in the debug output file:
setModels : Client, List Str -> Client
setModels = \client, models ->
modelsOption = if
List.isEmpty models
then
Option.none {}
else
Option.some models
{ client & models: modelsOption }
However, by moving the if onto a new line, formatting completes correctly. The following:
setModels : Client, List Str -> Client
setModels = \client, models ->
modelsOption =
if List.isEmpty models
then Option.none {}
else Option.some models
{ client & models: modelsOption }
Formats as:
setModels : Client, List Str -> Client
setModels = \client, models ->
modelsOption =
if
List.isEmpty models
then
Option.none {}
else
Option.some models
{ client & models: modelsOption }
This formatting still is incorrectly choosing the early return formatting style, even though this is assignment.
The text was updated successfully, but these errors were encountered:
Looks like I've found a bug which was likely introduced with the formatting for early return
if
statements (#7060). I have a case where an assignment usingif/then/else
causes a formatting failure, and is being formatted with a hangingelse
in the debug output as though it were an early return:Causes a format failed bug, but gets formatted as the following in the debug output file:
However, by moving the
if
onto a new line, formatting completes correctly. The following:Formats as:
This formatting still is incorrectly choosing the early return formatting style, even though this is assignment.
The text was updated successfully, but these errors were encountered: