fix(dart): function argument indents is inconsistent

This commit is contained in:
Robert Brunhage 2023-04-11 09:15:58 +02:00 committed by Stephan Seitz
parent a82501244a
commit ac4020c707
3 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,13 @@
// Example method that causes an issue with indentation on usage
void someMethod(
void onSuccess(),
void onError(Exception ex, StackTrace stackTrace),
) {
try {} catch (_, __) {}
}
void main() {
someMethod(() {
}, (Exception ex, StackTrace stackTrace) {
});
}

View file

@ -18,4 +18,6 @@ end)
describe("new line:", function()
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
run:new_line("multiple_arguments.dart", { on_line = 10, text = "var x;", indent = 4 })
run:new_line("multiple_arguments.dart", { on_line = 11, text = "var x;", indent = 4 })
end)