mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
Use correct function bodies index
This commit is contained in:
parent
ef2073ba4c
commit
50f8f2cb1d
1 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,11 @@ pub fn lower(
|
|||
if home_params.is_some() {
|
||||
for index in 0..decls.len() {
|
||||
match decls.declarations[index] {
|
||||
Function(_) | Recursive(_) | TailRecursive(_) => {
|
||||
let arity = decls.function_bodies[index].value.arguments.len();
|
||||
Function(fn_index) | Recursive(fn_index) | TailRecursive(fn_index) => {
|
||||
let arity = decls.function_bodies[fn_index.index()]
|
||||
.value
|
||||
.arguments
|
||||
.len();
|
||||
home_top_level_idents.insert(decls.symbols[index].value.ident_id(), arity);
|
||||
}
|
||||
Value => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue