class X::TypeCheck::Assignment is X::TypeCheck { }

Error class thrown when the type check of an assignment fails.

For example, this will die

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

though compilers are allowed to detect obvious cases like this example and complain at compile time with a different error.

Typegraph§

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

Expand chart above