diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-21 18:04:46 +0300 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2022-08-22 11:16:36 +0300 |
| commit | b55a5007faad1de054e86e00bfdc9a58e5fc4ff8 (patch) | |
| tree | e0c0713b6056b24f48e614805225739e8069f420 /doc | |
| parent | b2f02a820f1ed46721ed55243cead52efed055d7 (diff) | |
| download | zig-b55a5007faad1de054e86e00bfdc9a58e5fc4ff8.tar.gz zig-b55a5007faad1de054e86e00bfdc9a58e5fc4ff8.zip | |
Sema: fix parameter of type 'T' must be comptime error
Closes #12519
Closes #12505
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 9247d3bc43..04d736609a 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5023,8 +5023,8 @@ fn shiftLeftOne(a: u32) callconv(.Inline) u32 { // Another file can use @import and call sub2 pub fn sub2(a: i8, b: i8) i8 { return a - b; } -// Functions can be used as values and are equivalent to pointers. -const call2_op = fn (a: i8, b: i8) i8; +// Function pointers are prefixed with `*const `. +const call2_op = *const fn (a: i8, b: i8) i8; fn do_op(fn_call: call2_op, op1: i8, op2: i8) i8 { return fn_call(op1, op2); } |
