is X::TypeCheck does X::Comp
Compile time error thrown when a Macro
or an unquote/hole in a quasi
quote does not return an AST
.
For example
use experimental :macros;macro quasi-ast ;say quasi-ast;
dies with
===SORRY!=== Type check failed in macro application; expected AST but got Str("not AST")
This is because you are purposefully creating something that does not evaluate to an abstract syntax tree. To fix, instead write
use experimental :macros;macro an-astsay an-ast; # OUTPUT: «yes AST»
Methods§
method action§
method action(--> Str)
Returns a verbal description of the action that triggered the error, "macro application"
or "unquote evaluation"
.