File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -559,7 +559,7 @@ C<X::Comp::AdHoc> will be thrown.
559
559
CATCH { default { say .^name, ' ', .Str } }
560
560
# OUTPUT: «X::Comp::AdHoc Method 'overload-this' must be implemented by A because it is required by roles: R.»
561
561
562
- = head3 Role auto -punning
562
+ = head3 Auto -punning
563
563
564
564
A role can be used instead of a class to create objects. Since roles can't
565
565
exist at runtime, a class of the same name is created that will type check
@@ -592,7 +592,7 @@ comma can be provided. In this case conflicts will be reported at compile time.
592
592
593
593
For runtime mixins see L < but|/language/operators#infix_but > and L < does|/language/operators#infix_does > .
594
594
595
- = head3 Role Parameters
595
+ = head3 Parameterized
596
596
597
597
Roles can be provided with parameters in-between C < [] > behind a roles name.
598
598
X < |Type Capture (role) > L < Type captures|/type/Signature#Type_Captures > are supported.
@@ -620,7 +620,7 @@ Default parameters can be provided.
620
620
CATCH { default { say .^name, ': ', .Str} }
621
621
# OUTPUT: «X::AdHoc: Could not instantiate role 'R':Please provide a parameter to role R»
622
622
623
- = head3 Roles as Types
623
+ = head3 As Type Constraints
624
624
625
625
Roles can be used as type constraints wherever a type is expected. If a role is
626
626
mixed in with C < does > or C < but > , its type-object is added to the type-object
You can’t perform that action at this time.
0 commit comments