From 20f89773d8081a871a26840a9e0ad7cec513b841 Mon Sep 17 00:00:00 2001 From: Jhonathan Abreu Date: Fri, 27 Sep 2024 13:16:37 -0400 Subject: [PATCH] Minor fix --- src/runtime/Types/ClassBase.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/runtime/Types/ClassBase.cs b/src/runtime/Types/ClassBase.cs index f726e931c..f9b974d59 100644 --- a/src/runtime/Types/ClassBase.cs +++ b/src/runtime/Types/ClassBase.cs @@ -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); @@ -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); }