mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Do not clone signature closure type
This commit is contained in:
parent
1ab8742d71
commit
cf1982733e
1 changed files with 2 additions and 8 deletions
|
@ -2584,14 +2584,8 @@ fn constrain_typed_def(
|
||||||
let defs_constraint = constraints.and_constraint(argument_pattern_state.constraints);
|
let defs_constraint = constraints.and_constraint(argument_pattern_state.constraints);
|
||||||
|
|
||||||
let signature_closure_type = {
|
let signature_closure_type = {
|
||||||
let signature_closure_type_index = {
|
let signature_closure_type_index =
|
||||||
// TODO(types-soa) get rid of clone
|
constraints.push_type(types, signature_closure_type);
|
||||||
let typ = types.clone_with_variable_substitutions(
|
|
||||||
signature_closure_type,
|
|
||||||
&Default::default(),
|
|
||||||
);
|
|
||||||
constraints.push_type(types, typ)
|
|
||||||
};
|
|
||||||
constraints.push_expected_type(Expected::FromAnnotation(
|
constraints.push_expected_type(Expected::FromAnnotation(
|
||||||
def.loc_pattern.clone(),
|
def.loc_pattern.clone(),
|
||||||
arity,
|
arity,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue