mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
codegen for walkRight
This commit is contained in:
parent
5d0ec57461
commit
25cd0a2c02
7 changed files with 188 additions and 15 deletions
|
@ -3196,7 +3196,9 @@ fn call_by_name<'a>(
|
|||
None => {
|
||||
// This must have been a runtime error.
|
||||
match procs.runtime_errors.get(&proc_name) {
|
||||
Some(error) => Stmt::RuntimeError(error),
|
||||
Some(error) => {
|
||||
Stmt::RuntimeError(env.arena.alloc(format!("{:?}", error)))
|
||||
}
|
||||
None => unreachable!("Proc name {:?} is invalid", proc_name),
|
||||
}
|
||||
}
|
||||
|
@ -3205,10 +3207,10 @@ fn call_by_name<'a>(
|
|||
}
|
||||
}
|
||||
}
|
||||
Err(_) => {
|
||||
Err(e) => {
|
||||
// This function code gens to a runtime error,
|
||||
// so attempting to call it will immediately crash.
|
||||
Stmt::RuntimeError("")
|
||||
Stmt::RuntimeError(env.arena.alloc(format!("{:?}", e)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue