| 1 | import v.ast |
| 2 | |
| 3 | struct Data { |
| 4 | a fn (stmt ast.Stmt, vp voidptr) bool |
| 5 | } |
| 6 | |
| 7 | pub fn (a []Data) reduce(iter fn (int, int) int, accum_start int) int { |
| 8 | iter(accum_start) |
| 9 | } |
| 10 | |
| 11 | pub fn test_anon_fn_void(func fn ()) int { |
| 12 | return 0 |
| 13 | } |
| 14 | |
| 15 | fn C.HasAnonFnWithNamedParams(cb fn (c C.bar, d voidptr)) |
| 16 | |
| 17 | // NB: the signature of both anonymous functions should only differs in the param name |
| 18 | fn anon_fn_param_has_no_name(f fn (int) string) {} |
| 19 | |
| 20 | fn anon_fn_with_named_param(func fn (a int) string) {} |
| 21 | |