cl-typeck: Turn ref into a linked list.

This should be fine, since the only thing you can do with a ref is dereference it.
This commit is contained in:
2024-07-26 02:14:41 -05:00
parent 03a4e76292
commit 4096442f75
4 changed files with 10 additions and 13 deletions

View File

@@ -21,10 +21,8 @@ impl fmt::Display for Entry<'_, '_> {
TypeKind::Instance(id) => write!(f, "{}", self.with_id(*id)),
TypeKind::Intrinsic(kind) => write!(f, "{kind}"),
TypeKind::Adt(adt) => write_adt(adt, self, f),
&TypeKind::Ref(cnt, id) => {
for _ in 0..cnt {
f.write_str("&")?;
}
&TypeKind::Ref(id) => {
f.write_str("&")?;
let h_id = self.with_id(id);
write_name_or(h_id, f)
}