mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Fix lambda set numbering issue
This commit is contained in:
parent
ecf728a3f6
commit
aafefb12b2
1 changed files with 6 additions and 2 deletions
|
@ -10028,8 +10028,12 @@ pub fn find_lambda_sets_help(
|
|||
stack.extend(subs.get_subs_slice(*arguments).iter().rev());
|
||||
}
|
||||
FlatType::Func(arguments, lambda_set_var, ret_var) => {
|
||||
result.insert(*lambda_set_var, lambda_set_id);
|
||||
lambda_set_id = lambda_set_id.next();
|
||||
use std::collections::hash_map::Entry;
|
||||
// Only insert a lambda_set_var if we didn't already have a value for this key.
|
||||
if let Entry::Vacant(entry) = result.entry(*lambda_set_var) {
|
||||
entry.insert(lambda_set_id);
|
||||
lambda_set_id = lambda_set_id.next();
|
||||
}
|
||||
|
||||
let arguments = &subs.variables[arguments.indices()];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue