mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Inline BadType::BadTypeArguments in canonicalization errors
This commit is contained in:
parent
98464984dd
commit
8dfc9c0367
3 changed files with 51 additions and 54 deletions
|
@ -625,15 +625,13 @@ fn can_annotation_help(
|
|||
// use a known alias
|
||||
|
||||
if alias.type_variables.len() != args.len() {
|
||||
env.problem(roc_problem::can::Problem::BadType(
|
||||
Problem::BadTypeArguments {
|
||||
symbol,
|
||||
region,
|
||||
alias_needs: alias.type_variables.len() as u8,
|
||||
type_got: args.len() as u8,
|
||||
alias_kind: alias.kind,
|
||||
},
|
||||
));
|
||||
env.problem(roc_problem::can::Problem::BadTypeArguments {
|
||||
symbol,
|
||||
region,
|
||||
alias_needs: alias.type_variables.len() as u8,
|
||||
type_got: args.len() as u8,
|
||||
alias_kind: alias.kind,
|
||||
});
|
||||
return Type::Erroneous;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue