mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: subtype relation bug
This commit is contained in:
parent
8d5641503f
commit
9c9f8b7a0a
7 changed files with 233 additions and 121 deletions
|
@ -329,7 +329,11 @@ impl Context {
|
|||
if !self.is_trait(lhs) {
|
||||
return (Maybe, false);
|
||||
}
|
||||
self._nominal_subtype_of(lhs, rhs, |ty_ctx| &ty_ctx.super_traits)
|
||||
let (cred, judge) = self._nominal_subtype_of(lhs, rhs, |ty_ctx| &ty_ctx.super_traits[..]);
|
||||
if judge {
|
||||
return (cred, judge);
|
||||
}
|
||||
self._nominal_subtype_of(lhs, rhs, |ty_ctx| &ty_ctx.super_classes[..])
|
||||
}
|
||||
|
||||
/// lhs :> rhs?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue