mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
fix bugs exposed by reporting tests
This commit is contained in:
parent
5017a456be
commit
40bf9be1e2
3 changed files with 31 additions and 6 deletions
|
@ -187,6 +187,16 @@ fn can_annotation_help(
|
|||
let mut substitutions = ImMap::default();
|
||||
let mut vars = Vec::new();
|
||||
|
||||
if alias.vars.len() != args.len() {
|
||||
let error = Type::Erroneous(Problem::BadTypeArguments {
|
||||
symbol,
|
||||
region,
|
||||
alias_needs: alias.vars.len() as u8,
|
||||
type_got: args.len() as u8,
|
||||
});
|
||||
return error;
|
||||
}
|
||||
|
||||
for (loc_var, arg_ann) in alias.vars.iter().zip(args.into_iter()) {
|
||||
let name = loc_var.value.0.clone();
|
||||
let var = loc_var.value.1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue