| 1 | pub inline fn instanceRequestAdapter() void {} |
| 2 | |
| 3 | pub inline fn requestAdapter( |
| 4 | comptime callbackArg: fn () callconv(.@"inline") void, |
| 5 | ) void { |
| 6 | _ = &(struct { |
| 7 | pub fn callback() callconv(.c) void { |
| 8 | callbackArg(); |
| 9 | } |
| 10 | }).callback; |
| 11 | instanceRequestAdapter(undefined); // note wrong number of arguments here |
| 12 | } |
| 13 | |
| 14 | inline fn foo() void {} |
| 15 | |
| 16 | pub export fn entry() void { |
| 17 | requestAdapter(foo); |
| 18 | } |
| 19 | |
| 20 | // error |
| 21 | // |
| 22 | // :11:5: error: expected 0 argument(s), found 1 |
| 23 | // :1:12: note: function declared here |
| 24 | // :17:19: note: called inline here |