Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc parameters for roles
  • Loading branch information
gfldex committed Dec 25, 2016
1 parent 39f4221 commit cab78cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/Language/typesystem.pod6
Expand Up @@ -563,6 +563,13 @@ be achieved via C<subset>s.
role R[A-or-B ::T] {};
R[A.new].new;
Default parameters can be provided.
role R[$p = fail("Please provide a parameter to role R")] {};
my $i = 1 does R;
CATCH { default { say .^name, ': ', .Str} }
# OUTPUT«X::AdHoc: Could not instantiate role 'R':␤Please provide a parameter to role R␤»
=head3 Versioning and Authorship
Versioning and authorship can be applied via adverbs X«C«:ver<>»|:ver<> (role)» and X«C«:auth<>»|:auth<> (role)».
Expand Down

0 comments on commit cab78cb

Please sign in to comment.