mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Implement mono of crash
This commit is contained in:
parent
72ff0cc800
commit
c7ef1668d4
10 changed files with 84 additions and 7 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue