class X::Constructor::Positional is Exception { }

Thrown from Mu.new when positional arguments are passed to it.

For example

class A { };
A.new(2, 3);
CATCH { default { put .^name, ': ', .Str } };
# OUTPUT: «X::Constructor::Positional: Default constructor for 'A' only takes named arguments␤»

Typegraph§

Type relations for X::Constructor::Positional
raku-type-graph Positional Positional Stringy Stringy Blob Blob Blob->Positional Blob->Stringy Mu Mu Any Any Any->Mu Associative Associative Iterable Iterable IO::Path::Parts IO::Path::Parts IO::Path::Parts->Positional IO::Path::Parts->Any IO::Path::Parts->Associative IO::Path::Parts->Iterable Cool Cool Cool->Any List List List->Positional List->Iterable List->Cool Range Range Range->Positional Range->Iterable Range->Cool Uni Uni Uni->Positional Uni->Stringy Uni->Any Array Array Array->List Slip Slip Slip->List NFD NFD NFD->Uni NFKD NFKD NFKD->Uni NFC NFC NFC->Uni NFKC NFKC NFKC->Uni Buf Buf Buf->Blob utf8 utf8 utf8->Blob utf8->Any

Expand chart above