@@ -311,7 +311,7 @@ abstract static class MulNode extends ForeignBinaryNode {
311311 super (BinaryArithmetic .Mul .create (), false );
312312 }
313313
314- @ Specialization (insertBefore = "doComparisonBool" , guards = {"lib.hasArrayElements(left)" , "lib.fitsInInt(right)" })
314+ @ Specialization (insertBefore = "doComparisonBool" , guards = {"!lib.isNumber(left)" , " lib.hasArrayElements(left)" , "lib.fitsInInt(right)" })
315315 static Object doForeignArray (Object left , Object right ,
316316 @ Cached PRaiseNode raise ,
317317 @ Cached PythonObjectFactory factory ,
@@ -341,7 +341,7 @@ static Object doForeignArray(Object left, Object right,
341341 }
342342 }
343343
344- @ Specialization (insertBefore = "doComparisonBool" , guards = {"lib.hasArrayElements(left)" , "lib.isBoolean(right)" })
344+ @ Specialization (insertBefore = "doComparisonBool" , guards = {"!lib.isNumber(left)" , " lib.hasArrayElements(left)" , "lib.isBoolean(right)" })
345345 static Object doForeignArrayForeignBoolean (Object left , Object right ,
346346 @ Cached PRaiseNode raise ,
347347 @ Cached PythonObjectFactory factory ,
@@ -355,7 +355,7 @@ static Object doForeignArrayForeignBoolean(Object left, Object right,
355355 }
356356
357357 @ SuppressWarnings ("unused" )
358- @ Specialization (insertBefore = "doGeneric" , guards = {"lib.hasArrayElements(left)" , "isNegativeNumber(lib, right)" })
358+ @ Specialization (insertBefore = "doGeneric" , guards = {"!lib.isNumber(left)" , " lib.hasArrayElements(left)" , "isNegativeNumber(lib, right)" })
359359 static Object doForeignArrayNegativeMult (Object left , Object right ,
360360 @ Cached PythonObjectFactory factory ,
361361 @ CachedLibrary (limit = "3" ) InteropLibrary lib ) {
0 commit comments