perl6/doc/lib/X/TypeCheck/Assignment

doc src
(title) class X::TypeCheck::Assignment
    class X::TypeCheck::Assignment is X::TypeCheck { }

 
Error class thrown when the type check of an assignment fails. For example
    my Int $x = "foo"

 
dies with
    Type check failed in assignment to '$x'; expected 'Int' but got 'Str'

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

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: