pub fn check_body(
input: &ResolvedCommons,
body: &Block,
return_ty: TyId,
return_ty_span: Span,
scope: HashMap<String, TyId>,
caps: CapabilityCtx,
test_services: HashMap<String, TestServiceSig>,
test_actors: HashMap<String, ActorDecl>,
where_pred: Option<&Expr>,
sinks: CheckSinks<'_>,
) -> Option<TyId>Expand description
Type-check a bare body against return_ty in scope, with caps
available as both in-scope and declared capabilities and (if non-empty)
test_services/test_actors in scope for a test-case body’s svc.call/
by <Actor>(...) resolution (§32/#33: the one shape every hand-rolled
Ctx outside this crate needed, letting Ctx itself stay pub(crate)).
where_pred, if present, is checked first against Bool (a property’s
optional for all ... where filter — bynk.property.where_not_bool on
mismatch), sharing ctx with the main body so both populate the same
expr_types/errors sinks. Unlike check_handler_body, this skips
the linearity pass, the return-type-mismatch diagnostic, and the
unused-given diagnostic — nothing outside this crate that built its
own Ctx ran those either, and adding them here would be a behaviour
change, not a refactor.