mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Fix repl handling of invalid layouts
This commit is contained in:
parent
d6853519d8
commit
212090769f
1 changed files with 6 additions and 1 deletions
|
@ -58,7 +58,12 @@ pub fn gen_and_eval_llvm(
|
|||
|
||||
let (_, main_fn_layout) = match loaded.procedures.keys().find(|(s, _)| *s == main_fn_symbol) {
|
||||
Some(layout) => *layout,
|
||||
None => unreachable!(),
|
||||
None => {
|
||||
let empty_vec: Vec<String> = Vec::new(); // rustc can't infer the type of this Vec.
|
||||
debug_assert_ne!(problems.errors, empty_vec, "Got no errors but also no valid layout for the generated main function in the repl!");
|
||||
|
||||
return (None, problems);
|
||||
}
|
||||
};
|
||||
|
||||
let interns = loaded.interns.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue