mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +00:00
fix: sub-unification bugs
This commit is contained in:
parent
b318395a32
commit
0079aed860
10 changed files with 190 additions and 153 deletions
|
@ -1184,7 +1184,7 @@ impl Context {
|
|||
}
|
||||
}
|
||||
}
|
||||
if let Type::FreeVar(fv) = &lhs {
|
||||
if let Some(fv) = lhs.as_free() {
|
||||
let (sub, sup) = fv.get_subsup().unwrap();
|
||||
if self.is_trait(&sup) && !self.trait_impl_exists(&sub, &sup) {
|
||||
// link to `Never` to prevent double errors from being reported
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue