fix: protocol method calls arity-check (issue 0131)

emitProtocolDispatch now requires the user-arg count to equal the
protocol method's parameter list — exact, since protocol signatures
have no defaults, packs, or variadics — and emits the same
"expects N arguments, but M were given" diagnostic plain calls get.
Previously extra args were silently dropped (and missing args left the
thunk reading garbage). The dispatch gains the call-site span for the
diagnostic. examples/1634 pins the rejection; full sweep confirms no
existing code relied on the leniency.
This commit is contained in:
agra
2026-06-12 21:51:56 +03:00
parent ff94b004c4
commit d7808f69a3
6 changed files with 34 additions and 3 deletions