unbalanced-branches-error ( word quots declareds actuals -- * )
Factor handbook > The language > Stack effect checking > Stack checker errors

Prev:effect-error ( inferred declared -- * )
Next:undeclared-recursion-error ( word -- * )


Vocabulary
stack-checker.errors

Error description
Thrown when inference encounters an inline combinator whose input quotations do not match their declared effects, or when it encounters an if or dispatch whose branches do not all exit with the same stack height. See Combinator stack effects and Branch stack effects for details.

Examples
: if-unbalanced-branches-example ( a b c -- ) [ + ] [ dup ] if ;

: each-unbalanced-branches-example ( x seq -- x' ) [ 3append ] each ;


Definition


Methods