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

当向其传递位置参数时,从 Mu.new 抛出。

例如

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

Typegraph§

X::Constructor::Positional 的类型关系
raku-type-graph Positional Positional Mu Mu Any Any Any->Mu Cool Cool Cool->Any Iterable Iterable Range Range Range->Positional Range->Cool Range->Iterable Stringy Stringy Blob Blob Blob->Positional Blob->Stringy List List List->Positional List->Cool List->Iterable Associative Associative IO::Path::Parts IO::Path::Parts IO::Path::Parts->Positional IO::Path::Parts->Any IO::Path::Parts->Iterable IO::Path::Parts->Associative Uni Uni Uni->Positional Uni->Any Uni->Stringy Slip Slip Slip->List Array Array Array->List NFKC NFKC NFKC->Uni NFC NFC NFC->Uni NFD NFD NFD->Uni NFKD NFKD NFKD->Uni utf8 utf8 utf8->Any utf8->Blob Buf Buf Buf->Blob

展开上面的图表