mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: put the opening brace on a new line again for infix (#8336)
This commit is contained in:
12
vlib/v/fmt/tests/if_brace_on_newline_expected.vv
Normal file
12
vlib/v/fmt/tests/if_brace_on_newline_expected.vv
Normal file
@ -0,0 +1,12 @@
|
||||
fn get_typ() Type {
|
||||
{
|
||||
{
|
||||
// The opening brace should be put on a new line here for readability
|
||||
if typ := c.resolve_generic_type(method.return_type, method.generic_names,
|
||||
call_expr.generic_types)
|
||||
{
|
||||
return typ
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
vlib/v/fmt/tests/if_brace_on_newline_input.vv
Normal file
10
vlib/v/fmt/tests/if_brace_on_newline_input.vv
Normal file
@ -0,0 +1,10 @@
|
||||
fn get_typ() Type {
|
||||
{
|
||||
{
|
||||
// The opening brace should be put on a new line here for readability
|
||||
if typ := c.resolve_generic_type(method.return_type, method.generic_names, call_expr.generic_types) {
|
||||
return typ
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user