bad-macro-input ( macro -- * )
Factor handbook > The language > Stack effect checking > Stack checker errors

Prev:unknown-macro-input ( macro -- * )
Next:effect-error ( inferred declared -- * )


Vocabulary
stack-checker.errors

Error description
Thrown when inference encounters a combinator or macro being applied to a value which is not known at compile time. Such code needs changes before it can compile and run. See Combinator stack effects and Stack effect checking escape hatches for details.

Examples
In this example, the words being defined cannot be called, because they fail to compile with a bad-macro-input error:
: bad-example ( quot -- ) [ . ] append call ; inline : usage ( -- ) 2 2 [ + ] bad-example ;

One fix is to use compose instead of append:
: good-example ( quot -- ) [ . ] compose call ; inline : usage ( -- ) 2 2 [ + ] good-example ;


Definition


Methods