Camelia

class X::TypeCheck::Splice

src
    class X::TypeCheck::Splice is X::TypeCheck does X::Comp { }

 
Compile time error thrown when a L<Macro> or an unquote/hole in a quasi quote does not return an L<AST>. For example
    macro a { 'foo' }
    say a

 
dies with
    ===SORRY!===
    Type check failed in macro application; expected AST but got Str

 
To fix, instead write
    macro a {
        quasi { 'foo' }
    }
    say a;              # foo

 

Methods

action

    method action() returns Str:D

 
Returns a verbal description of the action that triggered the error, "macro application" or "unquote evaluation" .

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: