# Check that mtype it a pointer to a live cast type
fun hardening_cast_type(t: String)
do
if not compiler.modelbuilder.toolcontext.opt_hardening.value then return
add("if({t} == NULL) \{")
add_abort("cast type null")
add("\}")
add("if({t}->id == -1 || {t}->color == -1) \{")
add("PRINT_ERROR(\"Try to cast on a dead cast type: %s\\n\", {t}->name);")
add_abort("cast type dead")
add("\}")
end
src/compiler/separate_compiler.nit:1827,2--1838,4