sub_signature
ErrorsCollection

sub_signature

Synthesised documentation from type/Parameter

From type/Parameter

See Original text in context

method sub_signature(Parameter:D: --> 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 $sig = :(@array ($first*@rest), @other);
say $sig.params[0].sub_signature;     # OUTPUT:«($first, *@rest)␤» 
say $sig.params[1].sub_signature;     # OUTPUT:«(Signature)␤»