mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
better mono repl error
This commit is contained in:
parent
b65e65f0a4
commit
b702cb634f
3 changed files with 14 additions and 1 deletions
|
@ -34,3 +34,4 @@ bumpalo.workspace = true
|
|||
hashbrown.workspace = true
|
||||
parking_lot.workspace = true
|
||||
static_assertions.workspace = true
|
||||
indoc.workspace = true
|
|
@ -2749,7 +2749,18 @@ fn from_can_let<'a>(
|
|||
let (mono_pattern, assignments) =
|
||||
match from_can_pattern(env, procs, layout_cache, &def.loc_pattern.value) {
|
||||
Ok(v) => v,
|
||||
Err(_) => todo!(),
|
||||
Err(_) => {
|
||||
eprintln!(indoc::indoc! {"
|
||||
Error:
|
||||
This can happen if you redefine a variable in the repl, for example:
|
||||
|
||||
x = 1
|
||||
x = 2
|
||||
|
||||
Roc does not allow this yet.
|
||||
"});
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
// convert the continuation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue