Skip to content

Commit 4fd9dad

Browse files
committed
X::TypeCheck::MacroUnquote
1 parent 683e079 commit 4fd9dad

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

lib/X/TypeCheck/MacroUnquote.pod

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=begin pod
2+
3+
=TITLE class X::TypeCheck::MacroUnquote
4+
5+
class X::TypeCheck::MacroUnquote is X::TypeCheck does X::Comp { }
6+
7+
Compile time error thrown when a L<Macro> or an unquote/hole in a C<quasi>
8+
quote does not return an L<AST>.
9+
10+
For example
11+
12+
macro a { 'foo' }
13+
say a
14+
15+
dies with
16+
17+
===SORRY!===
18+
Type check failed in macro application; expected AST but got Str
19+
20+
To fix, instead write
21+
22+
macro a {
23+
quasi { 'foo' }
24+
}
25+
say a; # foo
26+
27+
=end pod

0 commit comments

Comments
 (0)