Skip to content

Commit 20f8977

Browse files
committed
Minor fix
1 parent 39b4db3 commit 20f8977

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/runtime/Types/ClassBase.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ public virtual NewReference type_subscript(BorrowedReference idx)
9494
public static NewReference tp_richcompare(BorrowedReference ob, BorrowedReference other, int op)
9595
{
9696
CLRObject co1;
97-
CLRObject? co2;
98-
object co1Inst;
9997
object co2Inst;
10098
NewReference error;
10199
BorrowedReference tp = Runtime.PyObject_TYPE(ob);
@@ -130,9 +128,7 @@ public static NewReference tp_richcompare(BorrowedReference ob, BorrowedReferenc
130128
return new NewReference(pytrue);
131129
}
132130

133-
TryGetSecondCompareOperandInstance(ob, other, out co1, out co2Inst);
134-
135-
if (co2Inst == null)
131+
if (!TryGetSecondCompareOperandInstance(ob, other, out co1, out co2Inst))
136132
{
137133
return new NewReference(pyfalse);
138134
}

0 commit comments

Comments
 (0)