| 1 | const S = extern struct { |
| 2 | a: fn () callconv(.c) void, |
| 3 | }; |
| 4 | comptime { |
| 5 | _ = @sizeOf(S) == 1; |
| 6 | } |
| 7 | |
| 8 | // error |
| 9 | // |
| 10 | // :2:8: error: extern structs cannot contain fields of type 'fn () callconv(.c) void' |
| 11 | // :2:8: note: type has no guaranteed in-memory representation |
| 12 | // :2:8: note: use '*const ' to make a function pointer type |