Skip to content

Commit 3dca63a

Browse files
committed
fix: unification bug
1 parent 0feab05 commit 3dca63a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/erg_compiler/context/unify.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,11 +660,9 @@ impl<L: Locational> Unifier<'_, '_, '_, L> {
660660
self.sub_unify(&l, sup)?;
661661
Ok(())
662662
}
663-
// OK: sub: (_: Nat), sup: 0
664-
// ERR: sub: (_: Nat), sup: "a"
665663
(TyParam::Erased(t), sup) => {
666664
let sup_t = self.ctx.get_tp_t(sup)?;
667-
if self.ctx.subtype_of(t, &sup_t.derefine()) {
665+
if self.ctx.subtype_of(t, &sup_t) {
668666
Ok(())
669667
} else {
670668
Err(TyCheckErrors::from(TyCheckError::subtyping_error(

0 commit comments

Comments
 (0)