This commit is contained in:
Folkert 2021-07-29 17:22:25 +02:00
parent aac0e2d9f9
commit 27c3d57e35
18 changed files with 391 additions and 146 deletions

View file

@ -227,8 +227,12 @@ fn can_annotation_help(
}
// make sure hidden variables are freshly instantiated
for var in alias.lambda_set_variables.iter() {
substitutions.insert(var.into_inner(), Type::Variable(var_store.fresh()));
for typ in alias.lambda_set_variables.iter() {
if let Type::Variable(var) = typ.0 {
substitutions.insert(var, Type::Variable(var_store.fresh()));
} else {
unreachable!("at this point there should be only vars in there");
}
}
// instantiate variables