docs(lang): fix invalid protocol method-signature snippets — (self) -> () -> s64 [F0.6]

A protocol method signature omits the receiver; a bare `self` has no type, so
`protocol { … :: (self) … }` fails at parse with 'expected :'. Correct the three
member-exemption doc snippets (readme.md, specs.md, issues/0089) to the valid
signature form, matching examples/0158's `Speaker :: protocol { s2 :: () -> s64; }`.
This commit is contained in:
agra
2026-06-04 23:02:09 +03:00
parent 166b42c308
commit b9a29c39c5
3 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@
> ([src/parser.zig]); a bare `f32` / `f64` is therefore rejected at parse
> (`expected field name in struct`) even in a member position, and still needs
> the backtick there too — `` struct { `f32: s64; } `` / `` union { `f64: … } ``
> / `` protocol { `f32 :: (self); } `` work as field / tag / method names.
> / `` protocol { `f32 :: () -> s64; } `` work as field / tag / method names.
> The exemption stops at member *definitions*: an `impl` method is a real
> function reached through the `impl_block` → `fn_decl` arm, so a
> reserved-spelled impl method needs the backtick (`` `s2 :: (self) ``), no