File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -311,9 +311,21 @@ d("four", "five"); # Fails when binding $x
311
311
312
312
= head2 method sub_signature
313
313
314
+ Defined as:
315
+
316
+ method sub_signature(Parameter:D: --> Signature:_)
317
+
314
318
If the parameter has a
315
319
L < sub-signature|/type/Signature#Sub-signatures > ,
316
- returns a C < Signature > object for it. Otherwise returns C < Any > .
320
+ returns a C < Signature > object for it. Otherwise returns C < Signature > .
321
+
322
+ B < Note: > Before Rakudo version 2020.08 the return value for a parameter
323
+ with no sub-signature was C < Any > .
324
+
325
+ = for code
326
+ my Signature $sig = :(@array ($first, *@rest), @other);
327
+ say $sig.params[0].sub_signature; # OUTPUT:«($first, *@rest)»
328
+ say $sig.params[1].sub_signature; # OUTPUT:«(Signature)»
317
329
318
330
= head2 method prefix
319
331
You can’t perform that action at this time.
0 commit comments