mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-25 04:52:32 +00:00
Do not clone return type
This commit is contained in:
parent
8107c30a4b
commit
410413aa96
1 changed files with 1 additions and 3 deletions
|
@ -3393,9 +3393,7 @@ fn constraint_recursive_function(
|
||||||
let fn_type = {
|
let fn_type = {
|
||||||
// TODO(types-soa) optimize for Variable
|
// TODO(types-soa) optimize for Variable
|
||||||
let lambda_set = types.from_old_type(&Type::Variable(closure_var));
|
let lambda_set = types.from_old_type(&Type::Variable(closure_var));
|
||||||
// TODO(types-soa) remove clone
|
let typ = types.function(pattern_types, lambda_set, ret_type);
|
||||||
let ret = types.clone_with_variable_substitutions(ret_type, &Default::default());
|
|
||||||
let typ = types.function(pattern_types, lambda_set, ret);
|
|
||||||
constraints.push_type(types, typ)
|
constraints.push_type(types, typ)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue