Skip to content

Commit 57a871c

Browse files
committed
outlaw macro-ish traits on multi
1 parent c6c7fcf commit 57a871c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

S06-routines.pod

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Synopsis 6: Subroutines
1616

1717
Created: 21 Mar 2003
1818

19-
Last Modified: 8 Nov 2011
20-
Version: 153
19+
Last Modified: 23 Jan 2012
20+
Version: 154
2121

2222
This document summarizes Apocalypse 6, which covers subroutines and the
2323
new type system.
@@ -2185,6 +2185,11 @@ Likewise 0-ary functions parse as listops. Use C<< term:<foo> >>
21852185
(or a constant or enum declaration) to declare a term that expects
21862186
no arguments.
21872187

2188+
Because these traits have an immediate declarative effect, it is
2189+
illegal to apply them to a C<multi>, or to any post-declared function.
2190+
More generally, any such language-bending declaration must follow
2191+
the same lexical scoping rules that a macro does.
2192+
21882193
=item C<is assoc>
21892194

21902195
Specifies the associativity of an operator explicitly. Valid values are:
@@ -2205,6 +2210,9 @@ and other operators defined at that level are required to be the same.
22052210
Specifying an C<assoc> without an explicit C<equiv> substitutes a default
22062211
C<equiv> consistent with the associativity, as shown in the final column above.
22072212

2213+
Because this trait has an immediate declarative effect, it is illegal
2214+
to apply it to a C<multi>, or to any post-declared function.
2215+
22082216
=item C<PRE>/C<POST>
22092217

22102218
These phasers declare statements or blocks that are to be unconditionally

0 commit comments

Comments
 (0)