class X::TypeCheck::Binding is X::TypeCheck { }

Thrown when the type check of a binding operation fails.

For example:

my Int $x := "foo";
CATCH { default { put .^name''.Str } };
# OUTPUT: «X::TypeCheck::Binding: Type check failed in binding; expected Int but got Str ("foo")␤»

Note that the compiler is free to detect obvious errors at compile time, and complain with a different error at compile time.


Type relations for X::TypeCheck::Binding
raku-type-graph X::TypeCheck::Binding X::TypeCheck::Binding X::TypeCheck X::TypeCheck X::TypeCheck::Binding->X::TypeCheck Mu Mu Any Any Any->Mu Exception Exception Exception->Any X::TypeCheck->Exception

Expand chart above