lang: opt-in UFCS — ufcs-marked fns + alias dot-dispatch, generic binding via receiver; one binding builder for plan-side generic returns

This commit is contained in:
agra
2026-06-11 17:04:51 +03:00
parent 84e0fb0752
commit a47ea1416e
27 changed files with 316 additions and 137 deletions

View File

@@ -142,6 +142,11 @@ pub const FnDecl = struct {
/// is a REQUIRED parameter, so a parser site cannot drop it; the default
/// here serves only post-check synthesized decls (which are never raw).
is_raw: bool = false,
/// `name :: ufcs (params) { body }` — the fn opted into dot-call
/// dispatch (`recv.name(args)`). Dot-calls on free functions are
/// OPT-IN: only `is_ufcs` fns and `ufcs` aliases dispatch; a plain
/// fn is callable directly or via `|>` only.
is_ufcs: bool = false,
};
pub const Param = struct {