mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Inline variable
This commit is contained in:
parent
2e07cc6c14
commit
ef509ecc97
1 changed files with 2 additions and 3 deletions
|
@ -3597,8 +3597,7 @@ fn rec_defs_help(
|
|||
let mut vars = Vec::with_capacity(state.vars.capacity() + 1);
|
||||
let ret_var = *ret_var;
|
||||
let closure_var = *closure_var;
|
||||
let ret_type = *ret_type.clone();
|
||||
let ret_type_index = constraints.push_type(ret_type.clone());
|
||||
let ret_type_index = constraints.push_type(*ret_type.clone());
|
||||
|
||||
vars.push(ret_var);
|
||||
vars.push(closure_var);
|
||||
|
@ -3627,7 +3626,7 @@ fn rec_defs_help(
|
|||
let fn_type_index = constraints.push_type(Type::Function(
|
||||
pattern_types,
|
||||
Box::new(Type::Variable(closure_var)),
|
||||
Box::new(ret_type.clone()),
|
||||
Box::new(*ret_type.clone()),
|
||||
));
|
||||
let body_type = NoExpectation(ret_type_index);
|
||||
let expr_con = constrain_expr(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue