Skip to content

Commit

Permalink
Merge branch 'master' of github.com:perl6/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fluca1978 committed Apr 28, 2018
2 parents 65c285c + c8835e7 commit 4ebcfc1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/Type/X/TypeCheck/Splice.pod6
Expand Up @@ -13,22 +13,22 @@ For example
=for code :skip-test
use experimental :macros;
macro a { 'foo' };
say a;
macro quasi-ast { quasi { {{{'not AST'}}} };};
say quasi-ast;
dies with
=for code :skip-test
===SORRY!===
Type check failed in macro application; expected AST but got Str
Type check failed in macro application; expected AST but got Str("not AST")
To fix, instead write
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 a {
quasi { 'foo' }
macro an-ast {
quasi { 'yes AST' }
}
say a; # foo
say an-ast; # yes AST
=head1 Methods
Expand Down

0 comments on commit 4ebcfc1

Please sign in to comment.