We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10def9d commit 53f32fdCopy full SHA for 53f32fd
doc/Language/typesystem.pod6
@@ -565,4 +565,15 @@ will be checked against the given code object.
565
CATCH { default { put .^name,': ', .Str } }
566
# OUTPUT«X::TypeCheck::Assignment: Type check failed in assignment to $i; expected Positive but got Int (-42) …»
567
568
+Subsets can be anonymous, allowing inline placements where a subset is required
569
+but a name is either needed or desireable.
570
+
571
+ my enum E1 <A B>;
572
+ my enum E2 <C D>;
573
+ sub g(@a where { .all ~~ subset :: where * ~~ E1|E2 } ) {
574
+ say @a
575
+ }
576
+ g([A, C]);
577
+ # OUTPUT«[A C]»
578
579
=end pod
0 commit comments