Implement mono of crash

This commit is contained in:
Ayaz Hafiz 2022-11-22 15:44:06 -06:00
parent 72ff0cc800
commit c7ef1668d4
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
10 changed files with 84 additions and 7 deletions

View file

@ -645,6 +645,14 @@ fn stmt_spec<'a>(
builder.add_terminate(block, type_id)
}
Crash(msg, _) => {
// Model this as a foreign call rather than TERMINATE because
// we want ownership of the message.
let result_type =
layout_spec(env, builder, interner, layout, &WhenRecursive::Unreachable)?;
builder.add_unknown_with(block, &[env.symbols[msg]], result_type)
}
}
}