rcl/golden/fmt/statement_complexity.test
Ruud van Asseldonk 29c1982ec4 Format long statement chains tall even if they fit
Maybe I am nitpicking here, but I think this will benefit readability.
It's cool that you can have let bindings anywhere, but it doesn't
necessarily make things more readable when you cram everything on one
line.
2024-06-16 23:25:00 +02:00

19 lines
417 B
Text

// This is still okay, one statement.
let okay = let x = 1; 1 + x;
// This, despite fitting on one line, wraps because it has two statements.
let wrap = let x = 1; let y = 2; 1 + x + y;
okay + wrap
# output:
// This is still okay, one statement.
let okay = let x = 1; 1 + x;
// This, despite fitting on one line, wraps because it has two statements.
let wrap =
let x = 1;
let y = 2;
1 + x + y;
okay + wrap