class X::Bind::Slice is Exception {}

When you try to bind to an array or hash slice:

my @a@a[01:= [42];
CATCH { default { put .^name''.Str } };
# OUTPUT: «X::Bind::Slice: Cannot bind to Array slice␤»


my %h%h<a b> := {};
CATCH { default { put .^name''.Str } };
# OUTPUT: «X::Bind::Slice: Cannot bind to Hash slice␤»

you get an exception of type ::Bind::Slice.


method type§

method type(X::Bind::Slice:D:)

returns the type object of the thing that you tried to slice-bind, for example Array, List or Hash.


Type relations for X::Bind::Slice
raku-type-graph X::Bind::Slice X::Bind::Slice Exception Exception X::Bind::Slice->Exception Mu Mu Any Any Any->Mu Exception->Any X::Bind::ZenSlice X::Bind::ZenSlice X::Bind::ZenSlice->X::Bind::Slice

Expand chart above