v2 / vlib / v / fmt / tests / attribute_call_syntax_keep.vv
19 lines · 14 sloc · 398 bytes · 3ffc951cf555dc4818309a507ccb9d0da4de748f
Raw
1@[unsafe()]
2fn allow_unsafe_parentheses() {}
3
4@[deprecated('use new_fn instead')]
5fn old_positional() {}
6
7@[deprecated(msg: 'use new_fn instead', after: '2999-10-10')]
8fn old_named() {}
9
10@[foo(bar: 'x', 123)]
11fn mixed_named_positional() {}
12
13@[foo(123, bar: 'x')]
14fn mixed_positional_named() {}
15
16struct Config {
17 flag bool @[custom(flag: true, count: 2)]
18 value string @[xml(name: 'cfg'); raw]
19}
20