mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
fix argument order bug for mapWithIndex
This commit is contained in:
parent
bd7ce52e26
commit
58ee7f0bfc
2 changed files with 16 additions and 2 deletions
|
@ -589,9 +589,9 @@ fn call_spec(
|
|||
let index = builder.add_make_tuple(block, &[])?;
|
||||
|
||||
let argument = if closure_env_layout.is_none() {
|
||||
builder.add_make_tuple(block, &[first, index])?
|
||||
builder.add_make_tuple(block, &[index, first])?
|
||||
} else {
|
||||
builder.add_make_tuple(block, &[first, index, closure_env])?
|
||||
builder.add_make_tuple(block, &[index, first, closure_env])?
|
||||
};
|
||||
builder.add_call(block, spec_var, module, name, argument)?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue