File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ If the parameter is anonymous, C<Nil> will be returned.
33
33
34
34
= head2 method sigil
35
35
36
+ Defined as:
37
+
38
+ method sigil(Parameter:D:) returns Str:D
39
+
36
40
Returns a string containing the parameter's sigil, for a looser
37
41
definition of "sigil" than what is considered part of
38
42
the variable's C < name|method name > . Still returns a sigil even
@@ -72,8 +76,16 @@ Defined as:
72
76
73
77
Returns C < True > if it's a L < named parameter|/type/Signature#Positional_vs._Named > .
74
78
79
+ my Signature $sig = :(Str $x, Bool :$is-named);
80
+ say $sig.params[0].named; # False
81
+ say $sig.params[1].named; # True
82
+
75
83
= head2 method named_names
76
84
85
+ Defined as:
86
+
87
+ method named_names(Parameter:D:) returns List:D
88
+
77
89
Returns the list of externally usable names/aliases for a
78
90
L < named parameter|/type/Signature#Positional_vs._Named > .
79
91
@@ -204,6 +216,10 @@ this parameter, or C<Any> if no default was provided.
204
216
205
217
= head2 method type_captures
206
218
219
+ Defined as:
220
+
221
+ method type_captures(Parameter:D:) returns List:D
222
+
207
223
Returns a list of variable names of type captures associated with this
208
224
parameter. Type captures define a type name within the attached code,
209
225
which is an alias to the type gleaned from the argument during a call.
You can’t perform that action at this time.
0 commit comments