add comment

This commit is contained in:
Folkert 2022-03-05 22:29:30 +01:00
parent 6380a9edf9
commit 9f11245b22
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -1707,6 +1707,11 @@ fn instantiate_rigids(
annotation.substitute(&rigid_substitution);
}
// TODO investigate when we can skip this. It seems to only be required for correctness
// for recursive functions. For non-recursive functions the final type is correct, but
// alias information is sometimes lost
//
// Skipping all of this cloning here would be neat!
let loc_annotation_ref = Loc::at(loc_pattern.region, &annotation);
if let Pattern::Identifier(symbol) = loc_pattern.value {
headers.insert(symbol, Loc::at(loc_pattern.region, annotation.clone()));