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
The first example is permitted since it's a single-line block.
I agree we should remove the second example.
However, I think perhaps we should rewrite this section to always require braces in every scenario, period. Too many bugs are caused by omitting braces, and adding a second line intending it to be indented under the conditional.
In this case, "multi-line block" is referring to "whatever the user thinks is a block" - which will only require braces if they understand how blocks work. Someone coming from a significant-whitespace language, for example, may not understand that difference.
Hello,
In 16.1, it says:
But in the examples, there's a contradiction:
And
The second one shouldn't say 'bad' since it's not multi-line block like the rule says.
The text was updated successfully, but these errors were encountered: