Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jhonabreul committed Sep 27, 2024
1 parent 39b4db3 commit 20f8977
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/runtime/Types/ClassBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ public virtual NewReference type_subscript(BorrowedReference idx)
public static NewReference tp_richcompare(BorrowedReference ob, BorrowedReference other, int op)
{
CLRObject co1;
CLRObject? co2;
object co1Inst;
object co2Inst;
NewReference error;
BorrowedReference tp = Runtime.PyObject_TYPE(ob);
Expand Down Expand Up @@ -130,9 +128,7 @@ public static NewReference tp_richcompare(BorrowedReference ob, BorrowedReferenc
return new NewReference(pytrue);
}

TryGetSecondCompareOperandInstance(ob, other, out co1, out co2Inst);

if (co2Inst == null)
if (!TryGetSecondCompareOperandInstance(ob, other, out co1, out co2Inst))
{
return new NewReference(pyfalse);
}
Expand Down

0 comments on commit 20f8977

Please sign in to comment.