opendylan icon indicating copy to clipboard operation
opendylan copied to clipboard

Warn when caller expects too many values

Open cgay opened this issue 4 years ago • 1 comments

It would be nice to get a warning for cases where the caller expects more values than are declared in the callee:

define function f () => (one-value :: <object>) 4 end;

let (x, y) = f();
format-out("%= %=\n", x, y);

https://play.opendylan.org/shared/cea9088d245f90fb

cgay avatar Nov 14 '21 01:11 cgay

See #1299 for the corollary, in which the function tries to return more values than declared in the signature.

cgay avatar Jul 02 '23 04:07 cgay