Documentation for method sub_signature
assembled from the following pages:
Class: Parameter §
From Parameter
(Parameter) method sub_signature §
Defined as:
method sub_signature(Parameter: --> Signature)
If the parameter has a sub-signature, returns a Signature
object for it. Otherwise returns Signature
.
Note: Before Rakudo version 2020.08 the return value for a parameter with no sub-signature was Any
.
my Signature = :( (, *), );say .params[0].sub_signature; # OUTPUT:«($first, *@rest)» say .params[1].sub_signature; # OUTPUT:«(Signature)»