mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-01 10:52:18 +00:00
Do not clone return type
This commit is contained in:
parent
bd9c9cc184
commit
d416b8b184
1 changed files with 2 additions and 4 deletions
|
@ -3826,11 +3826,9 @@ fn rec_defs_help(
|
|||
);
|
||||
|
||||
let fn_type_index = {
|
||||
// TODO(types-soa) optimize for variable
|
||||
let lambda_set = types.from_old_type(&Type::Variable(closure_var));
|
||||
// TODO(types-soa) remove clone
|
||||
let ret = types
|
||||
.clone_with_variable_substitutions(ret_type, &Default::default());
|
||||
let typ = types.function(pattern_types, lambda_set, ret);
|
||||
let typ = types.function(pattern_types, lambda_set, ret_type);
|
||||
constraints.push_type(types, typ)
|
||||
};
|
||||
let body_type =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue