mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
don't canonicalize Apply arguments twice
This commit is contained in:
parent
f82c4350fb
commit
b257a24edf
1 changed files with 2 additions and 22 deletions
|
@ -82,6 +82,7 @@ pub fn canonicalize_annotation(
|
||||||
let mut introduced_variables = IntroducedVariables::default();
|
let mut introduced_variables = IntroducedVariables::default();
|
||||||
let mut references = MutSet::default();
|
let mut references = MutSet::default();
|
||||||
let mut aliases = SendMap::default();
|
let mut aliases = SendMap::default();
|
||||||
|
|
||||||
let typ = can_annotation_help(
|
let typ = can_annotation_help(
|
||||||
env,
|
env,
|
||||||
annotation,
|
annotation,
|
||||||
|
@ -249,28 +250,7 @@ fn can_annotation_help(
|
||||||
actual: Box::new(actual),
|
actual: Box::new(actual),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => {
|
None => Type::Apply(symbol, args),
|
||||||
let mut args = Vec::new();
|
|
||||||
|
|
||||||
references.insert(symbol);
|
|
||||||
|
|
||||||
for arg in *type_arguments {
|
|
||||||
let arg_ann = can_annotation_help(
|
|
||||||
env,
|
|
||||||
&arg.value,
|
|
||||||
region,
|
|
||||||
scope,
|
|
||||||
var_store,
|
|
||||||
introduced_variables,
|
|
||||||
local_aliases,
|
|
||||||
references,
|
|
||||||
);
|
|
||||||
|
|
||||||
args.push(arg_ann);
|
|
||||||
}
|
|
||||||
|
|
||||||
Type::Apply(symbol, args)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BoundVariable(v) => {
|
BoundVariable(v) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue