mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +00:00
fix: unification bug
This commit is contained in:
parent
0feab05e73
commit
3dca63a597
1 changed files with 1 additions and 3 deletions
|
@ -660,11 +660,9 @@ impl<L: Locational> Unifier<'_, '_, '_, L> {
|
|||
self.sub_unify(&l, sup)?;
|
||||
Ok(())
|
||||
}
|
||||
// OK: sub: (_: Nat), sup: 0
|
||||
// ERR: sub: (_: Nat), sup: "a"
|
||||
(TyParam::Erased(t), sup) => {
|
||||
let sup_t = self.ctx.get_tp_t(sup)?;
|
||||
if self.ctx.subtype_of(t, &sup_t.derefine()) {
|
||||
if self.ctx.subtype_of(t, &sup_t) {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(TyCheckErrors::from(TyCheckError::subtyping_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue