v2 / vlib / v / fmt / tests / old_attrs_to_new_input.vv
23 lines · 20 sloc · 508 bytes · f7b9e4eafd25974e1e8d5dc60d799de8d75ce1d4
Raw
1module main
2import os
3[inline]
4[export: 'Java_io_vlang_V_callStaticMethods']
5[direct_array_access]
6[unsafe]
7[tom: 'jerry']
8fn heavily_tagged() {}
9
10[a_console] // a console attribute to force-open a console for easier diagnostics on windows
11[unsafe] // also it's not safe to use
12fn dangerous_console() {}
13
14[attribute_on_struct]
15struct Generic[T] {
16 x T [required]
17}
18
19struct Abc {
20 f fn () int [atr1] = fn () int { return 456 + os.args.len } @[atr2]
21 //
22 g Generic[int] [atr3] = Generic[int] { 123 } @[atr4]
23}
24