mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
feat: add Type::NamedTuple
This commit is contained in:
parent
bcebe04f3a
commit
ea0089f7df
9 changed files with 185 additions and 1 deletions
|
@ -1052,6 +1052,11 @@ impl<'c, 'l, L: Locational> Unifier<'c, 'l, L> {
|
|||
}
|
||||
}
|
||||
}
|
||||
(NamedTuple(sub_tup), NamedTuple(sup_tup)) => {
|
||||
for ((_, lt), (_, rt)) in sub_tup.iter().zip(sup_tup.iter()) {
|
||||
self.sub_unify(lt, rt)?;
|
||||
}
|
||||
}
|
||||
(Subr(sub_subr), Subr(sup_subr)) => {
|
||||
sub_subr
|
||||
.non_default_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue