Skip to content

Commit

Permalink
Fixes description of exception
Browse files Browse the repository at this point in the history
Closes #833
  • Loading branch information
JJ committed Apr 28, 2018
1 parent 9fc190d commit c8835e7
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 c8835e7

Please sign in to comment.