mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
hook everything up in the gen tests
This commit is contained in:
parent
05d1f28e83
commit
c00cd2f415
5 changed files with 47 additions and 18 deletions
|
@ -1905,13 +1905,15 @@ fn annotation_to_attr_type(
|
|||
let uniq_var = var_store.fresh();
|
||||
let (mut arg_vars, args_lifted) =
|
||||
annotation_to_attr_type_many(var_store, arguments, rigids, change_var_kind);
|
||||
let (closure_vars, closure_lifted) =
|
||||
annotation_to_attr_type(var_store, closure, rigids, change_var_kind);
|
||||
|
||||
// NOTE: we don't lift the closure var!
|
||||
// their uniqueness will never matter (it's a phantom parameter)
|
||||
// and not lifting makes code reuse possible
|
||||
|
||||
let (result_vars, result_lifted) =
|
||||
annotation_to_attr_type(var_store, result, rigids, change_var_kind);
|
||||
|
||||
arg_vars.extend(result_vars);
|
||||
arg_vars.extend(closure_vars);
|
||||
arg_vars.push(uniq_var);
|
||||
|
||||
match **closure {
|
||||
|
@ -1923,11 +1925,7 @@ fn annotation_to_attr_type(
|
|||
arg_vars,
|
||||
attr_type(
|
||||
Bool::variable(uniq_var),
|
||||
Type::Function(
|
||||
args_lifted,
|
||||
Box::new(closure_lifted),
|
||||
Box::new(result_lifted),
|
||||
),
|
||||
Type::Function(args_lifted, closure.clone(), Box::new(result_lifted)),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue