File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -200,23 +200,23 @@ C<Enumeration>s can be used in signatures with arguments converted
200
200
automatically to its corresponding C < enum > symbol:
201
201
202
202
= begin code
203
- enum Flags (
203
+ enum Flag (
204
204
FLAG_FOO => 0b001,
205
205
FLAG_BAR => 0b010,
206
206
FLAG_BAZ => 0b100,
207
207
);
208
208
209
- sub MAIN( Enumeration $flag = FLAG_FOO) {
209
+ sub MAIN(Flag $flag = FLAG_FOO) {
210
210
say "Flagging $flag";
211
211
}
212
212
= end code
213
213
214
214
This will work correctly with
215
215
216
216
= for code :lang<text>
217
- raku MAIN-enum.p6 FLAG_BAR
217
+ raku MAIN-enum.raku FLAG_BAR
218
218
219
- but will die if called with something that is not an enum .
219
+ but will die if called with something that is not a C < Flag > .
220
220
221
221
X < |%*SUB-MAIN-OPTS >
222
222
= head2 %*SUB-MAIN-OPTS
You can’t perform that action at this time.
0 commit comments