diff --git a/vlib/v/fmt/fmt.v b/vlib/v/fmt/fmt.v index e82f5ec3b5..056c65a7a4 100644 --- a/vlib/v/fmt/fmt.v +++ b/vlib/v/fmt/fmt.v @@ -112,6 +112,9 @@ fn (f mut Fmt) stmt(node ast.Stmt) { } f.writeln('') } + ast.Attr { + f.writeln('[$it.name]') + } ast.BranchStmt { match it.tok.kind { .key_break { diff --git a/vlib/v/fmt/tests/simple_expected.vv b/vlib/v/fmt/tests/simple_expected.vv index 08564e8cb3..3ce076e335 100644 --- a/vlib/v/fmt/tests/simple_expected.vv +++ b/vlib/v/fmt/tests/simple_expected.vv @@ -41,6 +41,7 @@ fn new_user() User { } } +[inline] fn fn_contains_range_expr() { a := 1 in arr[0..2] } diff --git a/vlib/v/fmt/tests/simple_input.vv b/vlib/v/fmt/tests/simple_input.vv index 72969af6f4..f5b1ceebc3 100644 --- a/vlib/v/fmt/tests/simple_input.vv +++ b/vlib/v/fmt/tests/simple_input.vv @@ -45,6 +45,8 @@ User } } + +[inline] fn fn_contains_range_expr() { a:=1 in arr[0..2] }