mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
chore: change logical operations order
This commit is contained in:
parent
57559b6b9f
commit
7cd895a30e
5 changed files with 12 additions and 13 deletions
|
@ -1196,9 +1196,9 @@ impl<'c, 'l, 'u, L: Locational> Unifier<'c, 'l, 'u, L> {
|
|||
// NG: (Int <: ?U); (?T <: Int)
|
||||
(Or(l1, r1), Or(l2, r2)) | (And(l1, r1), And(l2, r2)) => {
|
||||
if self.ctx.subtype_of(l1, l2) && self.ctx.subtype_of(r1, r2) {
|
||||
let (l_sup, r_sup) = if self.ctx.subtype_of(l1, r2)
|
||||
&& !l1.is_unbound_var()
|
||||
let (l_sup, r_sup) = if !l1.is_unbound_var()
|
||||
&& !r2.is_unbound_var()
|
||||
&& self.ctx.subtype_of(l1, r2)
|
||||
{
|
||||
(r2, l2)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue