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