t/cast does not run under rewriting type checking
The AST rewriting algorithm deletes the contract check for casts.
This passes static type checking, but does not run the code.
This happens because a t/cast expression is always rewritten to return `nil`. The AST rewriting algorithm should be fixed to preserve the original contract check.